Skip to content Skip to sidebar Skip to footer

Ember Handlebars Iterate Object And Display Key Inside Nested Each Helper

I want to iterate and render some text in my Ember Handlebars template I have a JSON as below; (comes within item) 'reas':{'Display Text 1':[null],'Display Text 2':[null]} I want

Solution 1:

Given following JSON (beautified version of one from your question):

{"reasons":{"Display Text 1":[null],"Display Text 2":[null]}}

You could iterate on it using {{each-in}} helper:

{{#each-in item.reasons as |key value|}}
    <tr>
        <td>{{key}}</td>
    </tr>
{{/each-in}}

Post a Comment for "Ember Handlebars Iterate Object And Display Key Inside Nested Each Helper"