I have an array like this :
var array = [1,20,50,60,78,90]; var id = 50;
How can i remove the id from the array and return a new array tha
You can use splice, though it is not underscore's API:
arrayObject.splice(index,howmany,item1,.....,itemX)
In your example:
var index = _.indexOf(array, id); array.splice(index, 1);