I have a collection of specific object types and I'm looking to duplicate it so that I can work on a separate version.
In order for the configuratorProduct to function correctly, I need to provide it with a copy of the listProducts values:
listProducts: Product[];
configuratorProducts : Product[];
This is my current approach:
this.configuratorProducts = this.listProducts.map(x => Object.assign({}, x));
for(let p in this.configuratorProducts)
{
var ck = this.accessories.filter(x=> x.idProductParent == p.idProduct);
}
The issue I am encountering is that the compiler is displaying:'Property 'idProduct' does not exist on type 'string'
How can this be resolved?
Thanks for your assistance.