Referencing $index of a repeat at higher level

I have a basic structure of


[code 1 here]

[code 2 here]
here I want to do something like this (code shortened)

<input class="form-check-input" type="radio" value=""  dmx-bind:name="input[{{repeat1.$index}}]" >

I want to reference the $Index of repeat1 from inside repeat2 to use it as an array index

I cannot work out how to do that?
anyone got a solution?


Earlier, it used to be $parent.$index, or something like it.
Now, we create a variable in the parent repeat, just above the child repeat, and set the value as $index.
Then use that variable in the child repeat to refer parent’s index.

1 Like

That’s indeed the correct way.

1 Like

Thanks everyone, had tried $parent.$index which returns null
Will try with variable

worked a treat, thanks to you both

1 Like