desperado1
New Member
Below is my json structure. On success of collection.fetch() i'm looping through the structure. Currently i use\[code\]this.collection.each(function(model) { .. }\[/code\]How do i obtain key name like plants, animals and instead loop using the names.JSON\[code\]var jsonObj = { // 0 - recommended , 1 - New "plants" : [ { "title" : "title1", "desc": "description.." }, { "title" : "titl2", "desc": "description." } ], "animals" : [ { "title" : "title1", "desc": "description.." }, { "title" : "titl2", "desc": "description." } ]};\[/code\]Snapshot of collection