There are four ways to do this as I know
const array = [{id:1,name:'Jim'},{id:2,name:'Parker'}];
const toDelete = 1;
The first:
_.reject(array, {id:toDelete})
The second one is :
_.remove(array, {id:toDelete})
In this way the array will be mutated.
The third one is :
_.differenceBy(array,[{id:toDelete}],'id')
// If you can get remove item
// _.differenceWith(array,[removeItem])
The last one is:
_.filter(array,({id})=>id!==toDelete)
I am learning lodash
Answer to make a record, so that I can find it later.