I'm not totally sure if I'm using the correct terminology or not, I'm relatively new to node.
I have two JSON objects
const objA = {
key1: value1
...
}
const objB = {
key2: value2
...
}
that I want to combine into one while keeping the two object names, so it would look a bit like:
const newObj = {objA: { key1: value1,...}, objB: { key2: value2,...}}
So far in my research I've found Object.assign(objA,objB) which just combines them as newObj = {key1: value1, key2: value2, ...}
Is there a way to do what I want?