Skip to content

Instantly share code, notes, and snippets.

@Walkeryr
Created August 18, 2015 12:05
Show Gist options
  • Save Walkeryr/9d3f32992b7af3fc6270 to your computer and use it in GitHub Desktop.
Save Walkeryr/9d3f32992b7af3fc6270 to your computer and use it in GitHub Desktop.
var foundFlat = null;
var foundFloor = null;
_.each(json, function(bulk) {
_.each(bulk.sections, function(section) {
_.each(section.floors, function(floor, floorData) {
if (floorData.flats) {
_.each(floorData.flats, function(flat) {
if (flat.id === flatId) {
foundFlat = flat;
foundFloor = floor;
}
});
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment