Discover Handlebars helpers for efficient, logic-less templating.
Handlebars supports the use of helpers, which are custom functions that can be called within templates to perform specific transformations or logic based on the template data.
In addition to the built-in helpers provided by Handlebars, we have added a couple more custom helpers to cater
to specific needs and enhance the templating capabilities.
compare: Compares two values using a specified operator.
Available operators are: ==,===,!=,!==,>,>=,<,<=,|| and&&
Copy
{{#compare prop "===" propB}} Content to display if `prop === propB` is true.{{/compare}}
json: Converts an object into a JSON string.
Useful if you need to, for example, render charts with a JSON representation of your data. Checkout our reports example to see it in action.
Copy
<script> var chartData = {{{json chartVariable}}}</script>