var obj1 = {
a: "imgood",
b: {
a1: {
a2: "i shouldnt be here",
b2: "imgood"
},
b1: "imgood"
}
};
var obj2 = {
b: {
a1: {
a2: "imgood"
}
}
};
console.log(Object.assign(obj1,obj2));
I want the a2 to be replaced but without loosing other properties.
in Simplest, Shortest and Fastest way possible