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
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
mode | choice (set, rename, remove) | Yes | No | Edit mode: set values (set), rename keys (rename), or remove fields (remove). (Default: "set") |
fields | array | Yes | No | List of operations. Each item defines a target field and the operation to perform. |
outputVariable | text | No | No | Output 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.