I am seeking to utilize JSON data in order to extract an object from the JSON structure where the "free" attribute has a value greater than 0. This extracted object will then be added to a new array. For instance, I aim to include {"free": 1, "used": 0, "total": 0, "usd_price": 0} in the array and generate a result like this [{"free": 1, "used": 0, "total": 0, "usd_price": 0}, {"free": 1, "used": 0, "total": 0, "usd_price": 0}]
{
"success": true,
"message": "",
"data": {
"BIT": {
"free": 0,
"used": 0,
"total": 0,
"usd_price": 0,
"usd_val": 0,
"percent_change_24h": 0,
"usd_pnl_24h": 0,
"name": "",
"logo": "https://www.trailingcrypto.com/assets/img/default-coin.png",
"portfolio_share": 0
},
"BTC": {
"free": 0,
"used": 0,
"total": 0,
"usd_price": 38400.82298054895,
"usd_val": 0,
"percent_change_24h": 0,
"usd_pnl_24h": 0,
"name": "Bitcoin",
"logo": "https://s2.coinmarketcap.com/static/img/coins/128x128/1.png",
"portfolio_share": 0
},
"DOT": {
"free": 0,
"used": 0,
"total": 0,
"usd_price": 20.07605927484185,
"usd_val": 0,
"percent_change_24h": 0,
"usd_pnl_24h": 0,
"name": "Polkadot",
"logo": "https://s2.coinmarketcap.com/static/img/coins/128x128/6636.png",
"portfolio_share": 0
}
}
}