When I run the code below, the listData (original data sources) will also be affected.
How can I improve my code so that downloadData can copy the data from listData and remove the id, createdBy, create_at, updatedBy and updated_at in the array but listData's data is being kept and not being altered?
let downloadData = this.listData.filteredData;
let downloadDataNum = downloadData.length;
for( let i = 0; i < downloadDataNum; i++ ) {
delete downloadData[i].id;
delete downloadData[i].createdBy;
delete downloadData[i].created_at;
delete downloadData[i].updatedBy;
delete downloadData[i].updated_at;
}