I have an array like this
var items = [{id:'1',token:'jj'},{id:'2',token:'kk'}];
I would like to delete an object from the array that matches id = 2
Here is my solution
//find the corresponding object
let obj=items.find((item) => item.id=='2');
//loop through the original and delete
Is there any other way to do this more efficiently??