How can I nest for loops in SCA (Handlebars) template language?
For example; I have an array of arrays and I want to loop over the inner array elements:
// Loop 1
{{#each footerNavigationLinks}}
<ul class="footer-content-nav-list">
// Nested loop
{{#each objectToAtrributes item}}
<li>aa
<a {{objectToAtrributes item}}>
{{text}}
</a>
</li>
{{/each}}
</ul>
{{/each}}
And footerNavigationLinks
is an array of arrays:
footerNavigationLinks: [
[
{text: 'Link a', href:'#'}
, {text: 'Link b', href:'#'}
, {text: 'Link c', href:'#'}
],
[
{text: 'Link a', href:'#'}
, {text: 'Link b', href:'#'}
, {text: 'Link c', href:'#'}
]
]