Lets take 2 arrays arr1 = ['a', 'b', 'c'] and arr2 = ['1' , '2', '3']. When passed these arrays as params to a soy template, I want to iterate as shown below and print an index that indicates total items iterated so far.
index: 0 //variable assigned to 0 by default
{foreach $i in $arr1}
{foreach $j in $arr2}
index = index + 1; //variable incremented by 1
{$index} th item //print item index
{/foreach}
{/foreach}
Since variable declared using let cannot be re-assigned to a new value, is there a way in templates to achieve the logic I have shown above.