我有一个 json,可在https://imgur.com/a/F3kV29F 或此处查看https://dweet.io/get/dweets/for/shyam__5
在 python 中,我可以通过执行以下操作打印 yearlyWatts:
print(collection[1]['content']['yearlyWatts'])
其中collection是json,由:
collection = (dweepy.get_dweets_for('shyam__5'))
我正在尝试在 Javascript 中做同样的事情。目前,我已经做了:
getCryptoCurrencyInfo(5)
.then(currencyInfo => {
console.log(currencyInfo[1].yearlyWatts)
这不起作用,我没有输出。
请不要关注函数 getCryptoCurrencyInfo,如果有人能告诉我在 console.log(HERE) 中写什么以输出 111255.51 的年瓦数,我将不胜感激
任何帮助,将不胜感激。谢谢!