I'm trying to use handlebars in my project, but am running into trouble getting it to output each object's attributes.
Data
people: [{"name":"Moe"}, {"name":"Larry"}, {"name":"Curly"}]
Template
{{#people}} Name: {{name}} <br/>{{/people}}
Output
Name:
Name:
Name:
It obviously reads the list of people, because it outputs three times. but I don't know why it's not able to see the simple path to name
.
- If I put
{{this.name}}
, it also renders a blank. - If I put
{{this}}
, I see[object Object]
.
How do I log or investigate this object so I know why the name attribute isn't being rendered?