We have a structure tree that should be standard plus one subfolder based on the document type. We currently have this designed as in the image on the left. Unfortunately, the structure tree disappears in parts when there is not a single object in this folder (right side of the first image).
How can I stop this?
When trying to realize this via the showempty or hideempty attribute, I got errors or results that did not bring me to my goal.

If I leave JSON-Definition empty then the empty folders are displayed correctly - see second image:
Our code is as follows:
[
{
"key":"documents",
"title":"Documents",
"title_locales":
{
"en":"Supplier documents",
"de":"Lieferantendokumente",
"zh":"供应商文件"
},
"expanded":true,
"folder":
[
{
"key":"creditorfiles",
"type":"creditorfile",
"title":"Document by type",
"title_locales": {
"en":"General supplier documents",
"de":"Allgemeine Lieferantendokumente",
"zh":"一般供应商文件"
},
"field": "file.abdocumenttype",
"expanded":true
},
{
"title":"Creditor Contacts",
"title_locales": {
"en":"Supplier contacts",
"de":"Lieferantenkontakte",
"zh":"供应商联系"
},
"key":"creditorcontacts",
"type": "creditorcontact",
"expanded":true
},
{
"title":"Creditor E-Mails",
"title_locales": {
"en":"Supplier E-Mails",
"de":"Lieferanten-E-Mails",
"zh":"供应商电子邮件"
},
"key":"creditoremails",
"type": "creditoremail",
"expanded":true,
"hideempty":false,
"showempty": true
},
{
"title":"Invoices",
"title_locales": {
"en":"Invoices",
"de":"Rechnungen",
"zh":"发票"
},
"key":"invoices",
"type": "cfivdocument",
"expanded":true,
"hideempty":false,
"showempty": true
}
]
},
{
"title":"Edited by me",
"title_locales" : {
"en":"Modified by me",
"de":"Von mir bearbeitet",
"zh":"由我修改的"
},
"key" : "ModifiedByMe",
"condition" : "modifier=#CURRENTUSER#"
},
{
"title": "Editors",
"title_locales" : {
"en":"Edited by",
"de":"Geändert von",
"zh":"修改的是"
},
"key": "Modifier",
"field": "modifiertitle"
},
{
"title" : "Modification range",
"title_locales" : {
"en":"Modification range",
"de":"Bearbeitungszeitraum",
"zh":"修改范围"
},
"key" : "ModifiedRange",
"method" : "daterange",
"field" : "modified"
}
]