var arr=[{a:1},{b:2}];
var arr2=JSON.parse(JSON.stringify(arr));
console.log(arr2);
arr2[0].a=2;
console.log(arr2);
console.log(arr);
var arr=[{a:1},{b:2}];
var arr2=JSON.parse(JSON.stringify(arr));
console.log(arr2);
arr2[0].a=2;
console.log(arr2);
console.log(arr);