Suppose I have json: { "data": { "data": { "data": { "set": "1" } } } }
I want to use ng-repeat to loop through this json, however I want to dynamically scroll through it, I will not know how many data objects I will have, sometimes it can be 3, and sometimes it can be 5, 6,7, etc. d.
How can I loop with ng-repeat without having to write ng-repeat as many times as there are data objects.
In javascript, I would just write something like this: function loop(data) { if (data.data) { loop(data.data) } }
source share