<?php $json = <<<JSON { "created_time": "2019-10-28T03:02:49+0000", "id": "2505284979588949", "field_data": [ { "name": "groupID", "values": [ "a3da23rad6" ] }, { "name": "email", "values": [ "edwardnorton@gmail.com" ] }, { "name": "first_name", "values": [ "Edward" ] } ] } JSON; $data = json_decode($json, true); $fields = array_reduce($data['field_data'], static function ($fields, $entry) { $fields[$entry['name']] = $entry['values']; return $fields; }); print_r($fields);
You have javascript disabled. You will not be able to edit any code.