Here is a solution if you are not using jQuery:
myArray = myArray.filter(function( obj ) {
return obj.id !== id;
});
More Related Contents:
- Converting a JS object to an array using jQuery
- Remove array element based on object property
- Why does typeof array with objects return “object” and not “array”? [duplicate]
- How to add an object to an array
- Filter array of objects with another array of objects
- Using jQuery to compare two arrays of Javascript objects
- break array of objects into separate arrays based on a property
- Find object having maximum value for the `id` property in an array of objects
- Creating a JavaScript global array with static elements?
- How to get the difference between two arrays of objects in JavaScript
- Convert array to JSON
- Why can I add named properties to an array as if it were an object?
- JavaScript: filter() for Objects
- javascript filter array of objects
- How to get a number of random elements from an array?
- How to find if an array contains a specific string in JavaScript/jQuery?
- Sum JavaScript object propertyA values with the same object propertyB in an array of objects
- Merge 2 arrays of objects
- How to change value of object which is inside an array using JavaScript or jQuery?
- Merge multiple objects inside the same array into one object [duplicate]
- Generate unique number within range (0 – X), keeping a history to prevent duplicates
- Array Like Objects in Javascript
- Perform .join on value in array of objects
- Create a reset of javascript Array prototype when Array.prototype has been modified?
- Deep comparison of objects/arrays [duplicate]
- How can I convert a jQuery object to an Element?
- How to get an Array with jQuery, multiple with the same name
- How to group an array of objects based on multiple keys in Javascript?
- Best way to flatten JS object (keys and values) to a single depth array
- Using jQuery inArray with array of JavaScript Objects