0
I wonder if there is any way to subscribe to the content of an object. For example: I have two objects.
object1 {
name: '';
address = 'Rua Mario';
email: '';
}
object 2 {
name: 'Carlos';
email: '[email protected]';
}
Doubt occurs here.
this.object1 = this.object2;
console.log(this.object1);
Console output:
object 1 {
name: 'Carlos';
email: '[email protected]';
}
What I wanted:
object 1 {
name: 'Carlos';
address = 'Rua Mario';
email: '[email protected]';
}
What’s the easiest way to do that?
Your answer is good, so much so that I gave +1, but, could explain how you did to get the result and not just publish the answer, so it is more didactic for those who asked and for future research!
– LeAndrade