Skip to main content

Action: remove

Remove fields

It is not an error to remove a non-existent field

Example: unconditional removal

Input:

{"one":1,"two":2}

Pipe Language Snippet:

remove:
fields:
- two

Output:

{"one":1}

Example: conditional removal

Input:

{"one":1,"two":1}
{"one":1,"two":2}

Pipe Language Snippet:

remove:
condition: two >= 2
fields:
- two

Output:

{"one":1,"two":1}
{"one":1}

Field Summary

Field NameTypeDescriptionDefault
warn-on-missingboolEmit a warning if a field is missing but was expected to be removedfalse
conditionexpressionOnly run this action if the condition the specified condition is met-
fieldsarray of fieldsThe list of fields that should be removed if present-

Fields

warn-on-missing

Type: bool

Default: false

Emit a warning if a field is missing but was expected to be removed

condition

Type: expression

Only run this action if the condition the specified condition is met

fields

Type: array of fields

The list of fields that should be removed if present