remove array value by index javascript code example
Example 1: locate and delete an object in an array
var apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}];
var removeIndex = apps.map(function(item) { return item.id; }).indexOf(37);
apps.splice(removeIndex, 1);
Example 2: pop up element from specific index in array
let items = ['a', 'b', 'c', 'd'];
let index = items.indexOf('a')
let numberOfElementToRemove = 1;
if (index !== -1) { items.splice(index,numberOfElementToRemove)}