How can I get the value of final_balance in this JSON
{"1B22no5SKBuVRX3esHpgze5kAK5SzsA3B9":{"final_balance":1505100,"n_tx":1,"total_received":1505100}} I tried a lot but still can't access to that key.
let url = 'https://blockchain.info/balance?active=1B22no5SKBuVRX3esHpgze5kAK5SzsA3B9&cors=true'; fetch(url) .then(res => res.json()) .then((out) => { console.log('Checkout this JSON! ', out.final_balance); }) Appreciate any help!
https://stackoverflow.com/questions/66791395/get-key-value-from-json-that-start-with-two-braces March 25, 2021 at 08:33AM
没有评论:
发表评论