Thank you sir!
I
iamame10
@iamame10
0
Reputation
2
Posts
334
Profile views
0
Followers
0
Following
Posts made by iamame10
-
Looping an array inside its neighboring array
So i have 2 arrays and i want to print
Array2
inside ofArray1
{ "Array1":[ { "item1": "1-arr1 item1", "item2": "1-arr1 item2", }, { "item1": "2-arr1 item1", "item2": "2-arr1 item2", } ], "Array2":[ { "something1": "1-arr2 something1", "something2": "1-arr2 something2", }, { "something1": "2-arr2 something1", "something2": "2-arr2 something2", } ] }
i have tried:
{{#each Array1}} <span> {{item 1}} </span> <span> {{item 2}} </span> {{#each Array2}} <span> {{something1}} </span> <span> {{something2}} </span> {{/each}} <br></br> {{/each}}
and it doesn't work and just gives me an empty Array2 loop.
which looks like this:1-arr1 item1 1-arr1 item2 2-arr1 item1 2-arr1 item2
How can I make it so that my output would look like this:
1-arr1 item1 1-arr1 item2 1-arr2 something1 1-arr2 something2 2-arr2 something1 2-arr2 something2 2-arr1 item1 2-arr1 item2 1-arr2 something1 1-arr2 something2 2-arr2 something1 2-arr2 something2