I've a JSON string:
{
"items": [
{"name": "red" },
{"name": "blue" }
],
"test" : {
"items" :[
{ "name" : "Hello" },
{ "name" : "World" }
]
}
}
How do I print out
<li>Hello</li>
<li>World</li>
I tried with the template below but it doesn't work. It instead prints "Red and blue". I don't have access to change the JSON string, I have to manipulate the template only.
{{#test}}
{{#items}}
<li>{{name}}</li>
{{/items}}
{{/test}}
For some reason, the following code:
gives me exactly:
So, your template should be correct.