Last active
December 8, 2018 09:45
-
-
Save lydemann/7ca18719f4789460cac00aa067deaf2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nestedObject = { | |
data: { | |
info: { | |
stuff: { | |
thing: { | |
moreStuff: { | |
someVal: 40, | |
something: 'foo2' | |
} | |
} | |
} | |
} | |
} | |
} | |
let hasIt = containsInNestedObject(nestedObject, 40); // true | |
let doesntHaveIt = containsInNestedObject(nestedObject, "foo"); // false | |
console.log(hasIt, doesntHaveIt); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment