专题文章
时长:00:00更新时间:2020-11-27 19:41:30
在项目中,api要求的数据格式为。$scope.data = { ";name";:";zhangsan";.";Menus";: [{";id";:1},{";id";:2}]}。而我的返回格式为;$scope.data=[";name";:";zhangsan";] $scope.selected = [1,2,3];。需要将两个数组整合,其中$scope.selected要先转化为json对象,再进行push操作。代码如下:
查看详情