- Description:
This key toggles whether CloudCannon will remove empty nested inputs from an Object Input or Array Input using a given Structure before persisting them to your file.
Setting this key to
truewill remove empty nested inputs from an Object Input or Array Input using a given Structure before persisting them to your file. CloudCannon considers an input to be empty when its value isnull,' ', or undefined. If this key is true, empty inputs will be visible in the Data Editor but not the Source Editor. For this key to function, you must also configureid_keyfor the Structure, as removing inputs prevents CloudCannon from comparing Structure values.By default, this key is
false(i.e., CloudCannon does not remove empty inputs).You can also configure this behavior for specific values of a Structure using structure.values.[*].remove_empty_inputs.
- Appears in:
└── Structure └── remove_empty_inputs- Type:
boolean- Default value:
false- Examples:
In this example, we want to delete any unnecessary nested inputs (i.e., input we choose not to provide a value for) from Object or Array inputs referenceing the
event_detailsStructure.Copied to clipboard_structures: event_details: remove_empty_inputs: true values: - value: name: description: url: time: place: sponsor:{ "_structures": { "event_details": { "remove_empty_inputs": true, "values": [ { "value": null, "name": null, "description": null, "url": null, "time": null, "place": null, "sponsor": null } ] } } }