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 Name | Type | Description | Default |
---|---|---|---|
warn-on-missing | bool | Emit a warning if a field is missing but was expected to be removed | false |
condition | expression | Only run this action if the condition the specified condition is met | - |
fields | array of fields | The 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