After doing a JSON decode, I get the following:
[0] => stdClass Object
(
[@type] => d
[@rid] => #8:0
[@version] => 4
[@class] => users
[email] => xyz@something.com
[username] => SomeName
[password] => password
[out] => Array
(
[0] => #7:1
)
)
...
How do I access the @rid or @class properties of the object?
Use
$t = json_decode($var, true)to get an associative array back1Then you can access it via
$t['@type']1 2nd parameter of json_decode: When TRUE, returned objects will be converted into associative arrays.