-2
这是我的代码如何将数组数组转换为angularjs中的对象数组?
$scope.students=[];
$scope.students[[object Object][object Object]]
[0]{"id":"101","name":"one","marks":"67"}
[1]{"id":"102","name":"two","marks":"89"}
我想转换成以下格式一样。
$scope.students=[{"id":"101","name":"one","marks":"67"},{"id":"102","name":"two","marks":"89"}]
我试过使用.map函数但不工作,现在我想通过使用angularjs将数组数组转换为对象格式数组。
,你说的部分“这是我的代码” ...下面的代码是不是有效的JavaScript。所以......你能告诉我们你的实际代码吗? – frosty