Skip to content

Instantly share code, notes, and snippets.

@dreadjr
Created January 28, 2013 18:10
Show Gist options
  • Save dreadjr/4657724 to your computer and use it in GitHub Desktop.
Save dreadjr/4657724 to your computer and use it in GitHub Desktop.
var propertyValueOrUndefined = (((obj||{}).levelOne||{}).levelTwo||{}).property;
console.log(propertyValueOrUndefined);
var levelOneArrayElementOneOrUndefined = (((obj||{}).levelOne||{}).levelOneArray||[])[0];
console.log(levelOneArrayElementOneOrUndefined);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment