I'm trying to get a data from a JSON.
The JSON looks like this:
{
"object": "balance",
"available": [
{
"currency": "aud",
"amount": 0,
"source_types": {
"card": 0
}
}
],
"livemode": false,
"pending": [
{
"currency": "aud",
"amount": 37706,
"source_types": {
"card": 37706
}
}
]
}{
"object": "balance",
"available": [
{
"currency": "aud",
"amount": 0,
"source_types": {
"card": 0
}
}
],
"livemode": false,
"pending": [
{
"currency": "aud",
"amount": 37706,
"source_types": {
"card": 37706
}
}
]
}{
"object": "balance",
"available": [
{
"currency": "aud",
"amount": 0,
"source_types": {
"card": 0
}
}
],
"livemode": false,
"pending": [
{
"currency": "aud",
"amount": 37706,
"source_types": {
"card": 37706
}
}
]
}
All I need from there is the available balance
.
I tried this code but the output of this code is just this {{{
This is my code:
$amount = $balanceArr['balance']['available'][0]['amount'];
echo $amount;
Note that the $balanceArr
is just the JSON.
Could someone please advice on this issue?
Any help would be appreciated.
Thanks in advance.