Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Remove Objects From Array By Object Property
// Source:
var arr = [
id: 1,
property: "Property",
property: "Property",
// Get the index of the Array for object with id corresponding to 2:
var removeIndex = => { return; }).indexOf(2);
// Remove Object from Array:
arr.splice(removeIndex, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment