I am trying to clone an object and delete 2 properties,
this.clone = Object.assign({}, this.purchaseOrder)
console.log("0clone", this.clone)
this.clone.client_purchase_order_items.forEach((order, index) => {
delete order.list_of_measures;
delete order.isReadOnly;
});
console.log("purchase Order", this.purchaseOrder)
But its affecting cloned object and the which I used for cloning. I don't want to remove properties from this.purchase order. what should I do?