Here is my JSON:
{
"language": "eng",
"plugins": {
"search": false,
"import-xml": false,
"export-xml": false,
"import-pdf": false,
"export-pdf": false
},
"tabs": {
"general": {
"arm": "Գլխավոր",
"rus": "Главный",
"eng": "General",
"documentTitle": {
"arm": "Փաստաթղթի Անվանումը",
"rus": "Заголовок Документа",
"eng": "Document Title"
},
"sections": {
"14656691": {
"type": "field-section",
"title": "",
"elements": {
},
"collapse": false
},
"06558184": {
"type": "table-section",
"title": "",
"elements": {
},
"collapse": false
}
}
},
"custom-19588079": {
"arm": "Custom",
"rus": "Custom",
"eng": "Custom",
"documentTitle": {
"arm": "Փաստաթղթի Անվանումը",
"rus": "Заголовок Документа",
"eng": "Document Title"
},
"sections": {
}
}
}
}
For example I want to add new object in general sections object. How can I do it?
I tried to do something like this, but it doesn't work properly:
let config = {} (my object);
config = {...config.general.sections, ...{new object}}
but config result is config.general.sections object.
configwith a shallow copy ofconfig.general.sectionsplus whatever's in "new object".config.tabs.general.sections = {...config.tabs.general.sections, ...{new object}}Object.assign(config.tabs.general.sections, newObject)?