This is my handlebar block in html layout:
{{json language}}
This is my handlebar helper in my main build.js:
handlebars.registerHelper('json', function(language) {
var data = {
"marathi" : "m",
"hindi" : "h",
"english" : "e"
}
return ??
});
How do I return the "data" to the same html layout above? It can go anywhere in the html. The "language" comes from a yaml frontmatter in markdown file. If possible I want to loop through a specific json depending on the value of "language".
Thanks!