I am trying to get some specific fields out of this Json. I have already managed to retrieve the ones in the first level but I need to get some out of the data field. I would li
How about this?
$stuff = json_decode($json, true); $results = array(); foreach($stuff['response']['data'] as $chunk) { $artist = $chunk['artist']; $id = $artist['id']; $name = $artist['name']; $rank = $chunk['rank']; $tuple = array($id, $name, $rank); $results[] = $tuple; }