Answer the question
In order to leave comments, you need to log in
How to get correct data from JSON array?
Good day, I ran into one of the problems.
I receive a response from the server and something I can’t get the information I need from it.
Please help, below is the response from the server.
{
"accounts":[
{
"alias":"qw_wallet_rub",
"fsAlias":"qb_wallet",
"bankAlias":"QIWI",
"title":"Qiwi Account",
"type":{
"id":"WALLET",
"title":"Visa QIWI Wallet"
},
"hasBalance":true,
"balance":{
"amount":376.87,
"currency":643
},
"currency":643,
"defaultAccount":true
}
]
}
Answer the question
In order to leave comments, you need to log in
$result = json_decode($data,true);
get the data as an associated array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question