jerin john
jerin john

Reputation: 199

JSON array into handlebar

i have a json object as

[ "id", "birthday", "companymsgsthisperiod", "companythisperiodend", "cust_attr_boolean", "subscribed", "testgroup", "usermsgsthisperiod", "userthisperiodend" ]

now i would like to add this type of json object using handlebar into a file as

<div>/*json*/</div>

Can anyone help me to get through it?

Upvotes: 5

Views: 2589

Answers (2)

valavan
valavan

Reputation: 1

Finally it may satisfy your need.

tryhandlebarsjs.com - screenshot

Upvotes: -1

Keeper Hood
Keeper Hood

Reputation: 594

What you have there is an array. I guess from the documentation that you can use the each block helper

<div>
  {{#each dataArray}}
  <div>{{this}}</div>
  {{/each}}
</div>

Upvotes: 7

Related Questions