Skip to content

Instantly share code, notes, and snippets.

@alexpvieira
Created October 11, 2018 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexpvieira/29df3076a3dc1c6d835e20f86ec34885 to your computer and use it in GitHub Desktop.
Save alexpvieira/29df3076a3dc1c6d835e20f86ec34885 to your computer and use it in GitHub Desktop.
Find an object in array based on object's property
//ES6
var obj = objArray.find((obj) => { return obj.id === 3 })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment