Right now I have a json file that im using to populate data within a site.
LVL 1 - Main Collection page ->
LVL 2 - Collection Detail page ->
LVL 3 - Collection Detail page slider
So I have 3 $.each() statements nested within each other to achieve this. Everything works fine. I was just wondering if there is a more beneficial way of doing this?
example code:
$j.getJSON('collections.json', function(data, status){
// lvl 1
$.each(data.collections, function(i, collection){
// do your thing
// lvl 2
$.each(collection.details, function(v, detail){
// slider time - lvl 3
$.each(detail.slider, function(s, slide){
// inception achieved
});
});
});
});