Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get a specific object key from getTop(100)? Or even get a specific object key from every listed coin? #11

Open
steviecs opened this issue Feb 9, 2018 · 1 comment

Comments

@steviecs
Copy link

steviecs commented Feb 9, 2018

No description provided.

@cptiwari20
Copy link

cptiwari20 commented May 28, 2018

just get the coins and select the property from each object
eg; if we want to get the top 100 coins;

coinmarketcap.multi(coins => {
    var coins = coins.getTop(100);
   console.log(coins)
}

we get the logs of 100 top coins
now you can select each object by using the array.forEach() loop function;

properties we have: eg neo ```
{ id: 'gas',
name: 'Gas',
symbol: 'GAS',
rank: '77',
price_usd: '17.7026',
price_btc: '0.00244626',
'24h_volume_usd': '4074580.0',
market_cap_usd: '179298573.0',
available_supply: '10128375.0',
total_supply: '17190378.0',
max_supply: '100000000.0',
percent_change_1h: '0.03',
percent_change_24h: '-4.53',
percent_change_7d: '-26.58',
last_updated: '1527498853' },


coins.forEach((coin)=>{
console.log(coin.id);
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants