The way you're using customFields
, it's an object, not an array.
Anyways, the easiest way to fix this is to edit your data to have karma
as one of the properties so you can do this instead:
<!-- IF customFields.karma -->
Otherwise, you can add a helper (keep in mind you need to do this server side and client side):
Benchpress.registerHelper('equals', function (root, actual, expected) {
return actual == expected;
});
and do this in your template:
<!-- IF function.equals, customFields.name, "karma" -->
The full BenchpressJS docs (that's our templating system) are located here: BenchpressJS docs