I have a JArray that contains an array of objects. I am using handlebars.net to bind the data in the template.
In getReportDetails variable, I am getting an array of objects in the below format
[
{
"index": 1,
"Name": "Adam",
},
{
"index": 2,
"Name": "Sdam",
}
];
var template = Handlebars.Compile(source);
_logger.Info(getReportDetails);
var getdata = template(getReportDetails);
<tbody>
{{#each getReportDetails}}
<tr>
<td>{{Name}}</td>
</tr></tbody>
In getdata variable data is not binding. What am I doing wrong?
Your array is root of your data object, so you should use
#each this
:Working example: