0

How can I retrieve data only in a specific array? For example; I want to withdraw the balance of BTC Code block below

[{"accountAlias":"AusRSgfWfWSg","asset":"BTC","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"ADA","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"XRP","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"TUSD","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"DOT","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"SOL","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"BNB","balance":"0.00006119","crossWalletBalance":"0.00006119","crossUnPnl":"0.00000000","availableBalance":"0.00006119","maxWithdrawAmount":"0.00006119","marginAvailable":true,"updateTime":1680516643497},{"accountAlias":"AusRSgfWfWSg","asset":"ETH","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"USDT","balance":"400.91000000","crossWalletBalance":"400.91000000","crossUnPnl":"0.00000000","availableBalance":"400.91000000","maxWithdrawAmount":"400.91000000","marginAvailable":true,"updateTime":1680530690156},{"accountAlias":"AusRSgfWfWSg","asset":"USDP","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"USDC","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0},{"accountAlias":"AusRSgfWfWSg","asset":"BUSD","balance":"0.00000000","crossWalletBalance":"0.00000000","crossUnPnl":"0.00000000","availableBalance":"0.00000000","maxWithdrawAmount":"0.00000000","marginAvailable":true,"updateTime":0}]

  • Welcome, to improve your experience on SO please [take the tour](http://stackoverflow.com/tour) and read [how to ask](https://stackoverflow.com/help/how-to-ask), an [On Topic question](https://stackoverflow.com/help/on-topic), then look at the [Question Check list](https://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist), the [perfect question](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) and how to create a Minimal, [Complete and Verifiable Example.](http://stackoverflow.com/help/mcve) – Jason K Apr 03 '23 at 18:44
  • After decoding the json string with the function mentioned in the referred answer, you should also use `array_column($array, 'balance')` so you get an array of just balances – Manuel Guzman Apr 03 '23 at 22:17

0 Answers0