1
我有一個數組,這是我使用的推送方法:如何訪問對象陣列中angularjs
for(var j=0; j<$scope.currentUsers.length; j++){
$scope.Users.push({user_id:$scope.currentUsers[j].user_id, student_name:$scope.currentUsers[j].student_name,
"A":[{"color":"white"}, {count:0}],
"E":[{"color":"white"}, {count:0}],
"J":[{"color":"white"}, {count:0}]
});
}
我想知道如何我可以訪問到的計數中A,E或J〜
I tried $scope.Users[i].A.count
或I tried $scope.Users[i][A][count]
他們都showd我 「南」 或不確定。難道我做錯了什麼?
在此先感謝您的幫助!
謝謝!現在很清楚! – Lisa 2015-04-05 23:35:13