Here is my code given Below:
this.service.content(data).subscribe(
data => {
this.array1= data.Result;
this.array2= data.Result;
/* Adding Additional Properties */
this.array2.forEach(function(el:any){
el.isActive = false;
});
}
When is add an item to array2 as you see in the code. Unfortunately, the item gets added into array1 as well. Kindly, provide solution to add property to array2 without affecting the value of array1.
And i also tried slice property to data.Result, but it didn't worked as expected.