从JavaScript数组中获取值

时间:2015-06-16 14:57:13

标签: javascript

说我有一个类似的数组:

var someArray = [{"id":1,"mid":"477","mname":"StackOverflow","image":"images/merchants/so.jpg"}, {"id":2,"mid":"478","mname":"Meta","image":"images/merchants/mt.jpg"}]

如何说出图像字符串images/merchants/so.jpg

1 个答案:

答案 0 :(得分:0)

someArray[0].image
or
someArray[0]['image']