Skip to main content

editFields

Applies a set of field assignments to every object in an input array. For each item, it sets (or overwrites) the specified fields with the given values and passes the full modified array downstream. All other existing fields on each object are preserved. The operation runs entirely in-process with no external calls.

Parameters

ParamTypeRequiredDescription
itemsobject[]YesArray of objects to edit. Minimum 1 item
fieldsFieldEdit[]YesList of field edits to apply to every item. Minimum 1 entry
fields[].fieldNamestringYesName of the field to add or overwrite
fields[].newValueanyYesValue to assign. Accepts any JSON-compatible type

Output

FieldTypeDescription
itemsobject[]The same number of objects as the input, each with the specified fields added or overwritten

Example

{
"id": "tagDocuments",
"type": "editFields",
"data": {
"label": "Tag Documents",
"isExecuted": false,
"handles": ["inputs", "outputs"],
"schema": {},
"params": {
"items": { "value": "{{ @fetchEntries.results }}", "isExpression": true, "isAttachedToInputNode": false },
"fields": {
"value": [
{ "fieldName": "status", "newValue": "reviewed" },
{ "fieldName": "version", "newValue": 2 }
],
"isExpression": false,
"isAttachedToInputNode": false
}
},
"inputs": [], "outputs": [], "errors": []
},
"position": { "x": 300, "y": 0 },
"isSelected": false,
"isDragging": false
}