How to access parent @index value in each-loop?
Tried the following:
{{#each company}}
{{#each employee}}
{{../@index}} // how to access company in
Answer: {{@../index}}
From the Handlebars docs (see bottom of 'each' helper section):
"Nested each
blocks may access the interation variables via depted paths. To access the parent index, for example, {{@../index}}
can be used."
NOTE: I'm using v1.3 so it's at least that old.
REMINDER: Helpers are your last best option. 9/10 there is a better solution.