Why don't you simply cast it as an array, i.e. (array) $yourJsonObject
? Sure, it might be multi dimensional, so in that case you'll need to do:
/ First we convert an object to a json string, then we convert the json string to an array
$jsonArray = json_decode(json_encode($yourJsonObject), 0xff);
EDIT: actually getJsonRawBody()
method does support 'associative' parameter as pointed in a link provided here by @nikolay-mihaylov
Still, I believe it's good to know when you don't have other option, json_**code
native PHP does the job in both directions.