Is there a way we can combine two objects by nesting the values if properties are same instead of overwriting ?
Eg:
const obj1 = {a:10,b:13}
const obj2 = {a:84,c:70}
desired result :
combinedObject = {a:{0:10,1:84}, b:13, c:70}
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
Is there a way we can combine two objects by nesting the values if properties are same instead of overwriting ?
Eg:
const obj1 = {a:10,b:13}
const obj2 = {a:84,c:70}
desired result :
combinedObject = {a:{0:10,1:84}, b:13, c:70}