Skip to content

Instantly share code, notes, and snippets.

@hassansw
Last active May 10, 2018 13:10
Show Gist options
  • Save hassansw/8b0b3de15273e163f845c6a8f700489c to your computer and use it in GitHub Desktop.
Save hassansw/8b0b3de15273e163f845c6a8f700489c to your computer and use it in GitHub Desktop.
Javascript Filter
listOfObjects.filter(x => x.obj > 1); //or any other condition to filter the list
listOfObjects.filter(x => anotherList.includes(x.anyObject));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment