I have a twig array i get from a hook, when i dump(array) the array it returns this array:
array:1 [
0 => array:2 [
"Key1" => "Value1"
"Key2" => "Value2"
]
]
This is how i dump it:
<div> {{ dump(array) }} </div>
But when i try to print this it returns Nothing:
<div> {{ array }} </div>
I also am trying to convert it to a javascript array like this but it returns null:
var test = {{ itm|json_encode() }};
console.log(test);