0

I have a double array that I'm passing into my Mustache file and the first two levels are indexed by number. The variable name is {{groups}} so I can iterate through the outer part with {{#groups}}{{/groups}} but within each group is an array of questions.

I want to be able to iterate through each question and create some html for each. How can I do this if the references are numerical?

Turnerj
  • 4,258
  • 5
  • 35
  • 52
Jarryd Goodman
  • 477
  • 3
  • 9
  • 19

1 Answers1

0

It'd be easier to give you an answer if you provided some code and/or data examples, but the gist of it is that you need an implicit iterator:

{{# groups }}
  {{# . }}
     <!-- this section will happen once per element in each element of groups -->
  {{/ . }}
{{/ groups }}
bobthecow
  • 5,047
  • 25
  • 27