I have let's say this object
const obj = {
background: {
backgroundColor:{
background: '#ffffff'
},
backgroundImage:{
background: 'url(...)'
}
},
header:{
logo:{
width: '100%'
},
title:{
color: '#000000'
}
}
}
And I need to deconstruct it into something like this:
const deconstructedObj = {
backgroundColor:{
background: '#ffffff'
},
backgroundImage:{
background: 'url(...)'
},
logo:{
width: '100%'
},
title:{
color: '#000000'
}
}
This is just an example, my objects are bigger, but idea is the same, first keys need to be deconstructed, how do I do that?