Accessing nested objects in array using each helper in handlebars

781 Views Asked by At

I have data in this format

"numbers":[
        {
            "callFlow":{
                "type":"RING-ONE"
            },
            "number":"111111111"
        }
 ]

and my html looks likes this

{{#each numbers}}
{{number}}
{{callFlow.type}}
{{/each}}

Expected Output is

111111111
RING-ONE

But I get Output as

111111111
1

There are 1 best solutions below

0
On

This is what you are looking for:

{{#each numbers}}
 {{this.number}}
 {{this.callFlow.type}}
{{/each}}