Skip to content

Instantly share code, notes, and snippets.

@MCheli
Created August 19, 2016 14:46
Show Gist options
  • Save MCheli/05d4f421b48d49e892d2ebbdd865869e to your computer and use it in GitHub Desktop.
Save MCheli/05d4f421b48d49e892d2ebbdd865869e to your computer and use it in GitHub Desktop.
Looping through nested objects
var propertyList = JSON.parse(newProject.dataConfig);
//Loop through the list types of data
for(key in propertyList) {
//Loop through the properties in each type of data
for(prop in propertyList[key]) {
result = propertyList[key][prop].propType;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment