var fkTableArr1d = new Array();
fkTableArr1d = _.map(fkTableArr2d, function(list, iterator, context) {
return { "id " : list[0], "label " : list[1] };
});
fkTableArr1d
变为:
[Object, Object, Object]
1 个对象是Object {id : "5", label : "fuel"}
现在我应该如何获取带有标签的元素的 ID fuel
?
下面一个不起作用:
console.log(fkTableArr1d['fuel']);