I need to pass an array passed in Twig as a parameter for a javascript object.
$app->render("site/home.twig.html", array(
"page" => "home",
"trans" => $translationfile
));
$translationfile is a value generated from json_decode'ing a JSON file containing translation values.
When I attempt to access the part of the file I want to access;
var translations = "{{ trans.production }}";
I get "Array" as an answer.
I assume there's a way to obtain the array? Do I need to encode it?