<input class="autocomplete" paramValue={{param_value}} aria-token-json = "{{{JSON.strigify(user_role_field)}}}">
Here user_role_field has array values, but I want to stringify it. This input field is in Moustache JS.The input field is TokenInput Js package and the aria-token-json accepts Stringify value.
The syntax I applied is not working..Can anyone help please?
Moustache doesn't have a feature that allows you to call arbitrary JS.
You can pass a function in using the Lambda feature…
but this looks like a situation where you should convert
user_role_fieldto JSON before passing it to Moustache.(Since JSON isn't HTML, when you include it use
{{and}}and not the triple braces which are for dumping raw HTML source code into the document.)