backbone.js - Iterating through multi-nested objects in Javascript with Underscore -
I am using backcon and underscore. My object looks like this:
TopObject: {name: ", middleObjects: []} Middle Object: {name:" ", Object below: []} Object below: {name : '', Some other terms: ''} So if you have a top object, then it will have several middle objects in the form of a property, and one near the middle object There will be a property as the only place
I am not sure how I can display these areas in a table. It has been using underscores so far. var has some data in someTopObject = new TopObject (); // (some toobogs.get ('medium objects'), function (midobase) ) {// do something with midobage.name // do not make sure how to get the middle object.} Botam object}); Right now I know that in the below object There can be only 2 items, so I think I have the following objects in the first and second ob Getting Jack could hardly be coded, but I was not sure if there was any more great way. Thanks!
nestes loop?
_. Each (some TopObject .get ('medium objects'), function (midob) {_.each (midObj.get ('floor objects'), function (objas below) {// do stuff});});
Comments
Post a Comment