I'm not sure how to do this so any help would be appreciated. I have two objects I want to combine into one object. I've used the spread operator to do this:
newObj = {...obj1, ...obj2};
this, for example gives me this:
{
[
obj1A{
"item": "stuff",
"item": "stuff"
},
obj1B{
"item": "stuff",
"item": "stuff"
}
],
[
obj2A{
"item": "stuff",
"item": "stuff"
},
obj2B{
"item": "stuff",
"item": "stuff"
}
]
}
But what I want is this:
{
[
obj1A{
"item": "stuff",
"item": "stuff"
},
obj1B{
"item": "stuff",
"item": "stuff"
},
obj2A{
"item": "stuff",
"item": "stuff"
},
obj2B{
"item": "stuff",
"item": "stuff"
}
]
}
Anyone know how to do this?