php - jQuery - access multidimesional array from ajax response -


I am sending some data to Ajax, and as a response I get a multi-dimensional array.

  $ .ajax ({type: "post", url: "/slideshow/list.php", data: image id, success: function (data) {imagesList = data; console Log (imagesList); curentImage = imagesList [0];}});  

response, data looks like this I'm getting at console.log (imagesList) : I'm using php I am, and the feedback is such as & lt ;? Php echo json_encode ($ data)? & Gt;

  [[1,487124, "& lt; img src = \" http: \ / \ example.com \ images / / 1 / 487124.jpg \ " \ / ";", "Http: \ / \ example.com \ photos / salle-a-manger --- mineral \ / 649518", "title1"], [2,732924, "& lt; img Src = \ "http: \ / \ example.com \ / images \ / 1 \ / 732924.jpg \" \ />, "http: \ / \ / example.com \ / photos / Charity --- "," Heading 2 "], [334164 9," img src = \ "http: \ / \ example.com \ / images \ / 2 \ / 341649.jpg \" \ /  

If I click on The first array with imagesList [0] this only shows

how can i get them before or the other array, or within them He values ​​how can achieve?

Specify dataType in the Ajax request

 < Code> $ AJAX ({type: "post", url: "/slideshow/list.php", data: imageId, data type: "json", success: function (data) {$ .each (data, function (key, value) {Console.log ('key:' + key + ", value:" + value); // your stuff}};}});  

Comments