An Ajax call is computing me a multidimensional PHP array '$tree', after this call is made I would like to retrieve this array as a JSON.
My PHP page is only printing the Array:
print_r(json_encode($tree));
Here the success part of my ajax call:
success: function(data, textStatus, jqXHR) {
var myObject = JSON.parse(data);
alert(myObject);
}
Unfortunately the alert box is not triggered.
Also, I noticed that when I'm reaching my PHP page through a web browser:
print_r(json_encode($tree));
isn't displaying anything, while:
print_r($tree);
Is printing my multidimensional Array