0

What is the best way to get a value of a variable based on another in an array? Basically I want to return the balance (22752716) where the name is 'RiseBNB' for example and assign it to a variable which I can then show the user. This is a beginner question I'm assuming but all my attempts so far have failed.

This is the output I'm currently dealing with:

0: {balance: '0', decimals: 18, name: 'Binance Coin', symbol: 'BNB'} 1: {balance: '800000000000000000000000', contractType: 'ERC20', decimals: 18, name: 'TheVera.io', symbol: 'VERA', …} 2: {balance: '22752716', contractType: 'ERC20', decimals: 9, name: 'RiseBNB', symbol: 'RiseBNB', …} 3: {balance: '15000000000000', contractType: 'ERC20', decimals: 8, name: 'Minereum BSC', symbol: 'MNEB', …}

Will
  • 11
  • 2

0 Answers0