How can i display data from a bundle?

file

file

Hey!

You’ll need to add the file contents to the module exports, and probably also parse the file contents as JSON before you do that. It might help to read the docs on databinding.

Hope that helps!

OLLe I did it like this, (i couldnt do it with the .json file), but doing this the images arent showing on the preview( with the {imagefile)

file

file

Olle Or if i create a json file and store it in Gitfub is even better. How can i create the json file? :'v

How? :'v

This is how Olle suggested it:

<App>
    <JavaScript>
        var Observable = require('FuseJS/Observable');
        var bundles = require('FuseJS/Bundle');

        var spiders = Observable();
        bundles.read('spiders.json').then(function(data) {
            spiders.value = JSON.parse(data);
        });

        module.exports = {
            spiders: spiders
        }
    </JavaScript>
    <StackPanel>
        <Each Items="{spiders.Araneomorphae}">
            <Text Value="{name}" />
            <Image File="{imagefile}" />
        </Each>
    </StackPanel>
</App>