嗨我有问题的数组响应的JSON。 我应该得到的对象的成员。但该数组在另一个数组内。
这是返回的数组。如何获得数组内的数组?
var arr = [
[
{
"id": 4243430853,
"email": "[email protected]",
},
{
"id": 4227666181,
"email": "[email protected]",
},
{
"id": 4227644293,
"email": "[email protected]",
}
],
[
{
"id": 4243430854,
"email": "[email protected]",
},
{
"id": 4227666182,
"email": "[email protected]",
},
{
"id": 4227644294,
"email": "[email protected]",
}
]
];
我该如何挖掘价值?之前我会使用arr[i].email
,但现在它不起作用。我尝试过arr [0]。[i] .email,但返回的错误是missing name after . operator
。有没有办法可以删除外部数组?
只要删除括号内的'.'。 – Xufox
可能的重复[Javascript错误名称丢失后。运算符在变量函数](http://stackoverflow.com/questions/16172526/javascript-error-missing-name-after-operator-on-variable-function) – Xufox