Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 577
jerin john Avatar asked Feb 21 '13 11:02

jerin john


1 Answers

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>
like image 184
Keeper Hood Avatar answered Sep 23 '22 15:09

Keeper Hood