Let's say I have two nested objects that are structured very similarly:
let obj = {
"fontFamily": {
"primary": {
"sans": "Roboto"
}
}
}
let obj2 = {
"fontFamily": {
"primary": {
"mono": "Roboto Mono"
}
}
}
How can I merge them into one nested object like the below?
{
"fontFamily": {
"primary": {
"sans": "Roboto",
"mono": "Roboto Mono"
}
}
}