Concatenates the values of all fields with the same name and an array suffix into a value in a new field. Such array fields typically come as output from either parseJson() or splitString().

All array fields starting with index from and ending with index to are selected. If some index is missing, the concatenation stops with the previous index, thus if only index 0, 1 and 3 are present, only index 0 and 1 are concatenated. If the first index is missing, no field is added to the event.

ParameterTypeRequiredDefault ValueDescription
asstringoptional[a] _concatArray Name of output field.
field[b]stringrequired   Base name for array fields to concatenate.
fromnumberoptional[a] 0 First array index to include [0..∞].
prefixstringoptional[a]   Prefix to prepend to the generated string.
separatorstringoptional[a]   Separator between values.
suffixstringoptional[a]   Suffix to append to the generated string.
tonumberoptional[a]   Last array index to include (leave out to get all). Must be equal to or larger than from.

[a] Optional parameters use their default value unless explicitly set.

[b] The parameter name field can be omitted.

Hide omitted argument names for this function

Show omitted argument names for this function

concatArray() Examples

Click + next to an example below to get the full details.

Concatenate Object Arrays Into Single Array

Concatenate one or more objects from object arrays into a single array and string

Concatenate Values From Deeply Nested Array Elements

Concatenate deeply nested objects and arrays using objectArray:eval() function with itself

Concatenate Values in Arrays Into New Named Field

Concatenate values in flat arrays into new named field

Concatenate Values in Arrays Using Pipe Separation

Concatenate values in flat arrays using pipe separation between the concatenated values

Concatenate Values in Arrays With a Defined Prefix and Suffix

Concatenate values in flat arrays using prefix, suffix and separator

Concatenate Values of All Fields With Same Name in an Array

Concatenate values of all fields with same name in a flat array

Concatenate a Range of Values in Arrays

Concatenate values in flat arrays