Hey there, I'm currently in the process of populating an empty placeholder object which serves as a v-model for vue, although this particular detail is not crucial to the issue at hand. The object that I am extending the original one with might contain undefined objects within it. However, it is important for me to maintain the structure of the initial object regardless of what the incoming one looks like.
For instance, let's consider Object 1:
let object1 = { a : '', b : '', c : {name : 'Mark', title: 'Mr'}}
And then we have Object 2, which could sometimes appear like this:
let object2 = { a : 'AAA', b : 'BBB', c : undefined}
My goal is to preserve the structure of object 1 even if object 2 has the property c set as undefined. So, in this scenario:
let object1 = { a : 'AAA', b : 'BBB', c : {name : 'Mark', title: 'Mr'}}
Thank you for your assistance!