I have an array that i want to JSON.encode and then send to jQuery, so that i can do something with the data inside the array in jQuery.
on the server side i do this
$stepsArray = json_encode($stepsArray);
But when i try to open the encoded array in my script it suddenly changes all the " with & quot; (im working on a .twig page)
var stepsArray = '{{stepsArray}}';
I have tried te str.replace the & quot; with " but it doesnt work. I have also tried to use JSON.parse but it also doesnt de anything. Does this sound familiar to anyone?