I want to build an object of keyed objects.
Why is the spread operator not combining as used below? Instead it only keeps the second object.
let a = {
key1: {
floo: 'blar'
}
}
let b = {
key2: {
floo: 'blar'
}
}
console.log(...a, b);
And most importantly please show me the correct way to do this!
Thanks