js cut object from array code example
Example 1: typescript remove object from array
const index = myArray.indexOf(key, 0);
if (index > -1) {
myArray.splice(index, 1);
}
Example 2: javascript remove all objects from array of objects except first
var input = ['a','b','c','d','e','f'];
input.length = 1;
console.log(input);