Cannot use object of type stdClass as array?

Use the second parameter of json_decode to make it return an array:

$result = json_decode($data, true);

Leave a Comment