Skip to main content

Editer Champs

Edits fields in a data object or array. Three modes: set (define/modify values), rename (rename keys), remove (delete fields). Consolidates the former set_values and rename_keys blocks.

Parameters

ParameterTypeRequiredVariableDescription
modechoice (set, rename, remove)YesNoEdit mode: set values (set), rename keys (rename), or remove fields (remove). (Default: "set")
fieldsarrayYesNoList of operations. Each item defines a target field and the operation to perform.
outputVariabletextNoNoOutput variable name containing the result.

Output

Output variable : editFieldsResult

{
"result": "...",
"fieldsModified": 0,
"isArray": false
}

Example

Add a status field and rename a key.

Input :

{"nom": "Acme", "montant": 15000}

Output :

{"nom": "Acme", "montant": 15000, "status": "processed"}
Tip

Choose the mode based on the operation: set to add/modify, rename to rename, remove to delete. Each value can be a constant or a {{variable}} reference.