Skip to content

Instantly share code, notes, and snippets.

@geetotes
Created March 15, 2017 21:26
Show Gist options
  • Save geetotes/d35c99929d12e2bdb87714b38d4bc218 to your computer and use it in GitHub Desktop.
Save geetotes/d35c99929d12e2bdb87714b38d4bc218 to your computer and use it in GitHub Desktop.
function filterMyArray(filterProperty) {
let _ = this.myArray.concat(); // safely copy myArray (which is an array of objects)
let filtered = _.filter((i) => {
return i.propery === filterPropery
});
return filtered;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment