I have the following simplified document:
{
channel:'Channelname',
users: [
{userId:1},
{userId:2},
{userId:3}
]
}
How can i access the userId's in a {{#each}}
loop like so:
{{#each channels}}
{{channel}}
{{#each channels.users}}
{{userId}} //or {{channels.users.userId}} ?
{{/each}}
{{/each}}
The first {{#each}}
loop prints my channelname as expected, but the second {{#each}}
loop doesn't print anything.
Regards, Cid
Use
When going into an each loop, handlebars will use the key names in the array directly.