【发布时间】:2017-02-22 07:42:27
【问题描述】:
{ "Chemistry - II": [ { "id": "9", "title": "Solid State", "quecount": 12 }, { "id": "10", "title": "Solutions", "quecount": 9 }, { "id": "11", "title": "Electrochemistry", "quecount": 8 }, { "id": "6", "title": "d and f- Block elements", "quecount": 42 } ], "Physics": [ { "id": "3", "title": "Circular Motion", "quecount": 5 } ] }
我正在尝试对“quecount”求和,但没有得到结果
$scope.chlist;
for (i = 0; i < $scope.chlist.length; i++)
{
total += $scope.chlist[i].quecount;
}
$scope.totque = total;
我们将不胜感激。 谢谢。。
【问题讨论】:
-
您需要化学和物理的总和还是全部的总和?