I am trying to the balance in a PHP object, I tried everything but am getting array to string conversion error, here is the string
{
"status": true,
"message": "Balances retrieved",
"data": [
{
"currency": "NGN",
"balance": 0
}
]
}
its a response from a remote server, i am trying to get the balance, i tried
$response->data->balance
json_decode($response)->data->balance
json_decode($response[0])->data->balance
but none of them worked, the response from the remote server is stored in a variable called $response
How can i get the balance from the response