I have an array.
var tableHeader = [
{
key: 1,
value: 'inputname',
defaultChecked: true,
columnName: 'input.name',
}, {
key: 3,
value: 'callname',
defaultChecked: true,
columnName: 'call.name',
}, {
key: 4,
value: 'rank',
defaultChecked: true,
columnName: 'call.rank',
}, {
key: 5,
value: 'threshold',
defaultChecked: true,
columnName: 'call.threshold',
}, {
key: 9,
value: 'matchname',
defaultChecked: true,
columnName: 'match.name',
},
]
My requirement: I will remove the object having key 3. While I will push the same object to the array it will push to same position as before. The same will happen if I do for other objects.