Skip to content

Instantly share code, notes, and snippets.

@joshteng
Created September 8, 2017 13:17
Show Gist options
  • Save joshteng/b68bd5b2fab9f22d012fb1dcf1ca24fa to your computer and use it in GitHub Desktop.
Save joshteng/b68bd5b2fab9f22d012fb1dcf1ca24fa to your computer and use it in GitHub Desktop.
const property = { first: "Wes", last: "Side", address: { lines: ["first line", "second line"], city: "New York", state: "NY" }}

//to get the second line
const { address: { lines: [ , line2] } } = property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment