Skip to content

Key Value

Key Value (key-value)

Parse key-value pairs, like “k1=v1,k2=v2,…”.

Transform json

Minimal example

actions:
- key-value: {}
JSON
{
"actions": [
{
"key-value": {}
}
]
}

Contents

General

General
FieldTypeRequiredDescription
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()

Input

Input
FieldTypeRequiredDescription
input-fieldfield (string)Field containing text to parse as key-value pairs.
Examples: data_field

Output

Output
FieldTypeRequiredDescription
removeboolean (bool)Remove the field containing the value.
Default: false
autoconvertboolean (bool)Convert values if possible.
Default: false
multipleMultipleIf there are multiple k-v pairs with the same key, choose which one to use E.g. “a=1,b=2,b=3’.
Allowed values: first, last, array

Parsing

Parsing
FieldTypeRequiredDescription
delimstringThe delimiter between pairs, defaults to comma.
key-value-delimstringThe delimiter between the key and the value, default equals.
Default: =

Warnings

Warnings
FieldTypeRequiredDescription
suppress-warningsboolean (bool)Suppress warnings generated by this action.
Default: false

Schema

Multiple Options

ValueNameDescription
firstfirstFirst
lastlastLast
arrayarrayArray