I have an array of objects:
var items = [{ id: 1, text: \"test1\" }, { id: 2, text: \"test2\" }, { id: 3, text: \"test3\"}];
I have the fol
Use filter:
items.filter(function (item) { return item.id !== 2 || item.text !== "text2"; });
It's generally not a good idea to mutate the original array or else I would recommend Sirko's answer. The filter method produces a whole new array. It doesn't mutate the original array.
filter