I am using Angularjs, but i guess it can be simple JavaScript.
What I have done:
console.log(JSON.parse({{{JSON.stringify(items)}}}));
items
has the JSON object. I am getting the error:
Uncaught SyntaxError: Unexpected token o`.
I am not sure if it's the correct way to do this. Any idea?
I have figured it out:
{{{items|raw|json_encode}}}