I have a JSON String like this
$test=\'{\"var1\":null,\"var3\":null,\"status\":{\"code\":150,\"message\":\"blah blah\"}}\';
I want to access th
You can use json_decode() for this task. Also, your input string should have quotes:
$test='{"var1":null,"var3":null,"status":{"code":150,"message":"blah blah"}}'; $responseObj = json_decode($test); echo $responseObj->status->code;