Hi
I am using Aspose Word v16.4.0.
Is there a possibility to have a nested foreach block in the “mustache” template?
Example (List of phones within an single address entry):
<pre style=“border: 0px; vertical-align: baseline; font-family: Arial, Helvetica, sans-serif, “Courier 10 Pitch”, Courier, monospace; background: rgb(247, 247, 247); color: rgb(34, 34, 34); line-height: 21px; margin-bottom: 0px; padding: 1.5em; text-size-adjust: 140%; font-size: 15px;”>{{#foreach Order}}
{{Number}}
{{#foreach Addresses}}
{{Zip} {{City}} {{Street}}
{{#foreach Phones}}
{{Number}}{{Type}}
{{/foreach Phones}}
{{/foreach Addresses}}
{{/foreach Order}}
{{Number}}
{{#foreach Addresses}}
{{Zip} {{City}} {{Street}}
{{#foreach Phones}}
{{Number}}{{Type}}
{{/foreach Phones}}
{{/foreach Addresses}}
{{/foreach Order}}
Data structure:
// <-- Current context is here.
23
1234
Foo
Foo Street 123
777 777 777
Fix
666 666 666
Mobile
4312
Bar
Bar Street 131
777 777 777
Fix
666 666 666
Mobile
Thank you for your support.
Regards,
Simon