我从来没有问一个问题就在这里,但这里有云的价值。的JavaScript/Node.js的检索从字典中关键这是一个二维数组
可以说我有一个数组(名为whatever
),看起来像这样显示时:
[[{name: "Joe", price: 42}],[{name: "Smith", price: 34}],[{name: "Jerry", price: 67}]]
而且我想这样做whatever[1].price
(失败在我的程序),我希望能够以任何方式获取数组中的一个,并像任何[1] .price一样检索它。任何方式来做到这一点类似于ArrayName[index].key
?
'不管[访问1] .price' ...好吧,无论[1]是一个数组///所以'无论[1] [0] .price' –