javascript remove array type when single value code example
Example 1: delete from array based on value javascript
var index = array.indexOf(item);
if (index !== -1) array.splice(index, 1);
Example 2: remove item from array javascript
let someArray = [
{name:"Kristian", lines:"2,5,10"},
{name:"John", lines:"1,19,26,96"},
{name:"Kristian", lines:"2,58,160"},
{name:"Felix", lines:"1,19,26,96"}
];
someArray = someArray.filter(person => person.name != 'John');
It will remove John!