make a clone object in angular code example
Example: how to clone a object in javascript angular
const food = { beef: 'b', bacon: 'a' }
// "Spread"
{ ...food }
// "Object.assign"
Object.assign({}, food)
// "JSON"
JSON.parse(JSON.stringify(food))