I've fetched my data from backend and displayed it in console. Everything is perfect but I couldn't display it out in handlebars. here is my object,
how to render this data in handlebars
For iterating list of object take a look that answer This might be helpful for you.
{
person: {
police: {
firstname: "Yehuda",
lastname: "Katz",
},
army: {
firstname: "Yehuda",
lastname: "Katz",
}
},
}
Iterate the Object by following
{{person.police.firstname}} {{person.army.lastname}}
For Iteration over list of object follow
<ul class="people_list">
{{#each people}}
<li>{{this.name}} is {{this.age}} year old.</li>
{{/each}}
</ul>
Where people is like
{
people: [
{name: "Yehuda Katz", age: 22},
{name: "Alan Johnson", age: 32},
{name: "Charles Jolley", age: 45},
],
}