$data_array = [
["","","","2",""],
["","1","","",""]
];
$myJSONString = json_encode($data_array);
$my = [
"id"=> "1",
"name" => "easy",
"data" => $myJSONString,
];
$myJSON_File->add($my);
I want to store a matrix in JSON and then retrieve it to send it later to a javascript function. I tried but when I send it to JS function, the matrix is sent as a string. I also tried decoding it $myArray = json_decode($output); but that didn't work either.