I have issue with splicing item from an array object with specific property.
Here is the explanation.
delColumn($event: any, el: any) {
if ($event.target && el > -1) {
var colId: string = this.receivedData[0].value.columns[el].id;
var obj = this.receivedData[0];
obj.values.columns = obj.values.columns.filter(s => s.id != colId);
obj.values.rows.forEach(s => {
delete s.Col_1;
return s;
});
}
}
Now, My requirement is When I click on Delete Column it comes into this method and I want to delete specific column and rows associated with that.
Thanks for the help in advance.