I created a twig array and populated it with objects, and i want to parse that to an javascript array and objects
Twig array:
itm = array:1 [
0 => array:2 [
"Test1" => "Testtt1"
"Test2" => "Testtt2"
]
]
I tried to parse it like this but it return and empty array:
var arrAll = [];
arrAll = {{ itm|json_encode }}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…