Why delete is working in another data ?
this.Line = [];
this.showDataForm = [{
'name': 'BTC',
'data': [1,2,3,4]
'chart': 'linemulti'
}]
for (var index=0; index < this.showDataForm.length; index++) {
if ( this.showDataForm[index].chart === "linemulti" ) { // for merge chart
this.Line.push(this.showDataForm[index]);
}
}
for (var key=0; key < this.Line.length; key++){
delete this.Line[key].chart;
}
I try to show:
console.log(this.showDataForm);
[{'name':'BTC','data':[1,2,3,4]}]
why delete is working in this.showDataForm ? how to fix ?