Nested loops
-
Hi,
Is it possible to loop through nested objects?
If so, can sameone show me a simple code. I've tried to use {{#each group }} and then a nested loop {{#each prod}} but
this did not work."groups" : [{ "pg": "Fruits", "prod": [{"name": "Apple"},{"name": "Oranges"}] }, {"pg": "Veg", "prod": [{"name": "Onions"},{"name": "Lettuce"}] } ]
Thank you
-
Hi! maybe something like this https://stackoverflow.com/questions/9203858/how-do-i-use-nested-iterators-with-mustache-js-or-handlebars-js could help, maybe there is an error in the syntax of your code, try to compare with the examples in the stackoverflow question.
-
Not sure what did wrong previously but it works now ! thanks