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

Fields

FieldTypeRequiredDescription
description Generalstringdescribe this step.
condition Generallua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
delim ParsingstringThe delimiter between pairs, defaults to comma.
suppress-warnings Warningsboolean (bool)Suppress warnings generated by this action.
input-field Inputfield (string)Field containing text to parse as key-value pairs.
Examples: data_field
remove Outputboolean (bool)Remove the field containing the value.
autoconvert Outputboolean (bool)Convert values if possible.
key-value-delim ParsingstringThe delimiter between the key and the value, default equals.
multiple OutputMultipleIf 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

General

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

Parsing

Show fields
FieldTypeRequiredDescription
delimstringThe delimiter between pairs, defaults to comma.
key-value-delimstringThe delimiter between the key and the value, default equals.

Warnings

Show fields
FieldTypeRequiredDescription
suppress-warningsboolean (bool)Suppress warnings generated by this action.

Input

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

Output

Show fields
FieldTypeRequiredDescription
removeboolean (bool)Remove the field containing the value.
autoconvertboolean (bool)Convert values if possible.
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

Schema

Multiple Options

ValueDescription
firstFirst
lastLast
arrayArray