I'm playing with an API that's giving me data back in JSON format that I then json_decode() to the following format:
[stockData] => stdClass Object ( [data] => stdClass Object ( [PS3] => stdClass Object ( [2015-01-26T20:45:01Z] => stdClass Object ( [AMU] => 999.76 [ZIT] => 3.63 ) ) ) [status] => stdClass Object ( [code] => 200 [text] => ok ) ) I need some way of getting the 2015-01-26T20:45:01Z (which changes all the time).
I've tried get_Class() on the object, eg:
get_Class($bawsaq->stockData->data->PS3) (actually in a foreach loop)
But all that's returned is: "stdClass" and not the name. How can I get the object's name?
json_decode()so it returns arrays instead of objects?2015-01-26T20:45:01Zisn't the class name, it's a property name.