Skip to content

Instantly share code, notes, and snippets.

@ifahrentholz
Created March 17, 2016 12:12
Show Gist options
  • Save ifahrentholz/83074d70516dd4a2df39 to your computer and use it in GitHub Desktop.
Save ifahrentholz/83074d70516dd4a2df39 to your computer and use it in GitHub Desktop.
recursive iteration array / object
function eachRecursive(obj) {
for (var k in obj) {
if (typeof obj[k] == "object" && obj[k] !== null)
eachRecursive(obj[k]);
else {
console.log(k);
console.log(obj[k]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment