I am creating one application in AngularJS and I have a very complex JSON file that has so many child arrays and objects. So my question is: is it ok to use ng-repeat again and again to access data from JSON?
<div ng-repeat="parent in parents"> <div ng-repeat="child in parent"> <div ng-repeat="grandChild in child"> {{grandChild.name}} </div> </div> </div>
----- OR there is some looping method in AngularJS
----- OR should we use the old JavaScript for loop
Data examples
{"data": { "categories": { "articles": { "bdh": [ {"id":1, "name":"bdh article 1", "body":"this is bdh article 1 body."}, {"id":2, "name":"bdh article 2", "body":"this is bdh article 2 body."} ], "hadoop": [ {"id":3, "name":"hadoop article 1", "body":"this is hadoop article 1 body."}, {"id":4, "name":"hadoop article 2", "body":"this is hadoop article 2 body."} ] }, "videos": { "bdh Videos": [ {"id":5, "name":"bdh videos 1", "body":"this is bdh videos 1 body."}, {"id":6, "name":"bdh videos 2", "body":"this is bdh videos 2 body."} ], "hadoop Videos": [ {"id":7, "name":"hadoop videos 1", "body":"this is hadoop videos 1 body."}, {"id":8, "name":"hadoop videos 2", "body":"this is hadoop videos 2 body."} ] } } } }
json javascript angularjs
Akshay kumar
source share