After making an AJAX call in PHP, I receive a JSON array that I need to loop through and display all the information. However, I'm having trouble finding a method that works for this task. My usual foreach key => value method in PHP doesn't seem to be working here.
This is an example of my array:
[{"Type":"Person","Durable":"Durable","Url":"test.com"},
{"Type":"Person","Durable":"Durable","Url":"test2.com"},
{"Type":"Person","Durable":"Durable","Url":"test3.com"},
{"Type":"Person","Durable":"Durable","Url":"test4.com"},
{"Type":"Location","Durable":"Durable","Url":"test5.com"},
{"Type":"Phone","Durable":"Durable","Url":"test6.com"}]
The length of the array changes dynamically so it's not always 6 items. The loop will be part of the success handler function, but I need some guidance on how to access the data within.
success: function(data){
}