i have the following json
var tt = projects: [
{
"name": "A",
"amount": "10"
}, {
"name": "B",
"amount": "20"
}, {
"name": "C",
"amount": "30"
}
]
with dust.js template engine, is there a way to use this json and filter through to only render project with the name B?
i thought a dust helper {@if cond="{projects.name} == 'B' "}... could do it but i cannot make it work?
anyone has any ideas? any jsfiddle would be highly appreciated.