$scope.data=[
{"type":"00",
"obj":"[{"name":"a1","age":21},{"name" :"a2","age":21},{"name":"a3","age":21 }]"},
{"type":"01",
"obj":"[{"name":"a1","age":21},{"name":"a2" ,"age":21},{"name":"a3","age":21}]"}
]
Page template
<ul ng-repeat="item in data">
<li ng-repeat="detail in item.obj">{{detail.name}}{{detail.age}}</li>
</ul>
But because item.obj is not a array but a string object. My current method is just to control Loop the data array in the controller and convert the obj object into json. However, this method is not efficient because it requires looping to modify the data in the controller.
So I would like to ask if there is any way to change the item on the page. obj is converted into an array object, making ng-repeat effective, similar to
<li ng-repeat="detail in {{item.obj|Filter method}}">{{detail.name}}</li>Principal or other feasible methods,
业精于勤,荒于嬉;行成于思,毁于随。