JSFiddle - React, Tailwind, and code Playground
JavaScript
obj1 = {
education: ["school", "university", "institute", "collage"],
courses: ["HTML", "CSS", "JS", "Managing", "Directing"],
Computer: {
"OS":"WXP",
"WS":"NotePad",
"AV":"Avast"
}
};
obj2 = {
education: ["school", "institute"],
courses: ["HTML", "JS", "CSS"],
Computer: {
"OS":"WXP",
"WS":"NotePad"
}
};
obj3 = _.merge(_.cloneDeep(obj2), obj1);
console.log(JSON.stringify(obj3) === JSON.stringify(obj1));
//obj2 is still the same
console.log(obj2);