Open Jack2804 opened 8 months ago
Hi @Jack2804 I did a check and nested loops seems working fine. At least the next template is working:
<table>
{{#each all_services}}
<tr>{{this.service_description}}</tr>
{{#each this.service_items}}
<td>{{this.aaa}}</td>
<td>{{this.bbb}}</td>
{{/each}}
{{/each}}
</table>
I used the next data shape for it:
"all_services": [
{
"service_items": [
{
"aaa": "test_array_item_aaa",
"bbb": "test_array_item_bbb"
}
],
"service_name": "service_name",
"service_description": "service_description"
}
]
The result is next:
Based on provided screenshots you are missing service_items
array to iterate through.
You can use the next doc to get familiar with Handlebars templating language. https://handlebarsjs.com/guide/#what-is-handlebars
Hi. So i'm trying to create an email template for my webapp, and I encounter this issue where nested {{#each}} fails to generate a right JSON object for test data. I couldn't find the limitation anywhere in a doc. It is possible to do nested {{#each}} in Mailgun?