Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
68
rated 0 times [  70] [ 2]  / answers: 1 / hits: 27302  / 11 Years ago, sun, march 17, 2013, 12:00:00

I have the server passing back this JSON and I'm not sure how to loop through a 2-dimensional array in Handlebars.



userSurvey:[[1],[2],[3]]


I know to use {{#each userSurvey}} but then how would I go about do the arrays inside the usersurvey object?


More From » html

 Answers
9

You'd have to loop 2 times:



{{#each userSurvey}}
{{#each this}}
{{ this }}
{{/each}}
{{/each}}

[#79537] Friday, March 15, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
austenjordang

Total Points: 544
Total Questions: 112
Total Answers: 112

Location: Monaco
Member since Sun, Jan 16, 2022
2 Years ago
;