I have this list :
0: {id: 1, scoreValue: 33, coinValue: 1}
1: {id: 2, coinValue: 41, scoreValue: 1}
2: {id: 3, scoreValue: 33, coinValue: 0}
3: {id: 3, coinValue: 41, scoreValue: 33}
4: {id: 3, coinValue: 44, scoreValue: 33}
and I need to remove the item from this list with this code:
let model = {} as EdiltListModel;
let find = this.editListModel.find(x => x.id === id);
if (find !== undefined) {
model.id = find.id;
model.scoreValue = parseInt($event.target.value);
model.coinValue = coinValue;
const index = this.editListModel.findIndex(x => x.id = find.id);
this.editListModel = this.editListModel.slice(index, 1);
} else {
model.id = id;
model.scoreValue = parseInt($event.target.value);
model.coinValue = parseInt(coinValue);
}
this.editListModel.push(model);
but it not remove that item. How can I remove item from this list?