Tuesday, 27 August 2013

handlebars conditional block

handlebars conditional block

Apologies for such a novice question. I'm very new to handlebars and not
sure what approach to take here.
I have this JSON:
{
"fieldName": "amount",
"locked": false,
"visible": true,
"visibilityCheckBox": "UNCHECKED",
"values": [],
"domain": null
},
{
"fieldName": "awardType",
"locked": false,
"visible": true,
"visibilityCheckBox": "UNCHECKED",
"values": [],
"domain": null
},
{
"fieldName": "currencyCode",
"locked": false,
"visible": true,
"visibilityCheckBox": "UNCHECKED",
"values": [],
"domain": null
}
I want to populate following HTML from JSON using handlebars:
<input id="timeUnspecified" type="radio" name="awardType" value="from JSON"/>
How can I compare name with key in JSON using handlebars?

No comments:

Post a Comment