Yes, I have read previous questions and I know how to access a JSON object and how to convert it into an array. I know about json_encode/decode. My problem is that my JSON response has a string, arrays and all and it will always return NULL when I access the data directly.
object(Unirest\Response)#8 (4) {
["code"]=>
int(200)
["body"]=>
string(666) "{ "ticker": "AAPL:US", ".."
["headers"]=>
array(9) {
[0]=>
string(15) "HTTP/1.1 200 OK"
Normally you would be able to directly access the object like this and this worked just fine when I last accessed the script a few days ago:
$response->body->ticker
Or you could use json_decode with true to turn it into an array.
$array = json_decode($response->body, true);
However, all of this no longer works. I believe they changed something with the output because it was working just a while ago but I have no clue. Any idea how to access the ticker data? I tested it with a different API and the same commands are working just fine to retrieve data from a different API, but the output seems to be different.