Mustache: Repeating Sections
[
View Tutorial
]
Mustache Template:
Available Products:
{{#product}}
{{name}}: ${{price}}
{{/product}}
Data Object:
var data = { "product": [ { "name": "SuperWidget", "price": "19.99" }, { "name": "WonderWidget", "price": "24.99" }, { "name": "MegaWidget", "price": "29.99" } ] };
Process Template
HTML Result:
How It Looks: