0

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?

Serge K.
  • 5,303
  • 1
  • 20
  • 27
vishnuprasad kv
  • 990
  • 5
  • 22
  • 46

0 Answers0