Does someone know how to bind Json data to HandleBar?
Here is the source: https://github.com/rexm/Handlebars.Net
I could check this example:
string source =
@"<div class=""entry"">
<h1>{{title}}</h1>
<div class=""body"">
{{body}}
</div>
</div>";
var template = Handlebars.Compile(source);
var data = new
{
title = "My new post",
body = "This is my first post!"
};
var result = template(data);
And it works fine, but i have the data into a json, and also, i need to make iteration in the html. For example, this could be the json:
{"Threshold":12,"Server":[{"Name":"Machine1","CpuUsage":27,"RamUsage":62},{"Name":Machine2","CpuUsage":25,"RamUsage":57}]}
Thanks