I am trying that a variable that I have just defined has the value of an object and that I can also add more information to it at the same "level"
Something like that:
let obj1 = {
name: "jhon",
address: {
city: "abc123",
country: "def456",
zipcode: "123456",
},
job: {
position: "qwe123",
experience: "12 years",
},
}
let obj2 = {
info1: "abc123456",
info2: "12345678978",
info3: "1234567d78778",
}
let myobj = {
name: "jhon",
address: {
city: "abc123",
country: "def456",
zipcode: "123456",
},
job: {
position: "qwe123",
experience: "12 years",
},
info1: "abc123456",
info2: "12345678978",
info3: "1234567d78778",
}
console.log(obj1)
console.log(obj2)
console.log(myobj)
Let me explain, I want "myobj" to be equal to obj1 and obj2.
obj1 and obj2 come from different parts and I want the data to be in "myobj" at the same level, as shown in the code