[Solved] How to convert http response json data into php object, easy to identify the IDE


If you have this json for example:

$j = '{ 
"a" : 1,
"b" : "test"
}'

Then if you $o = json_decode($j) you can use $o as a standard object (e.g. $o->{a})
If you $o = json_decode($j, true) yon can use $o as associative array (e.g. $o["a"])

solved How to convert http response json data into php object, easy to identify the IDE