Closed mdrx-io closed 8 years ago
You'll need to pass through your own mock data in order to use the Handlebars "each" helper. I've added a small example to the readme that I hope will help: https://github.com/webroo/dummy-json#using-other-data
Here's another example using complex objects:
var myMockdata = {
animals: [
{species: 'fox'},
{species: 'badger'},
{species: 'crow'}
]
};
var template = '{{#each animals}}{{this.species}}{{/each}}';
var output = dummyjson.parse(template, {mockdata: myMockdata});
Would it be possible to add an example that uses the "each" helper to the README? The README references the built-in, but its usage with dummy-json is not straightforward.