Say I have this code
var arr = [{id:1,name:\'a\'},{id:2,name:\'b\'},{id:3,name:\'c\'}];
and I want to remove the item with id = 3 from the array. Is th
By Using underscore.js
var arr = [{id:1,name:'a'},{id:2,name:'b'},{id:3,name:'c'}]; var resultArr = _.reject(arr,{id:3}); console.log(resultArr);
The result will be :: [{id:1name:'a'},{id:2,name:'c'}]
[{id:1name:'a'},{id:2,name:'c'}]