嗨我有問題的數組響應的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