Skip to main content

$$concat

Concatenates primary value array with elements or other arrays of elements

note

Elements which are null on the primary value will be ignored.

Usage​

{ 
"$$concat": /* Array of arrays / elements (null elements are ignored) */
}
"$$concat:{input}"

Returns​

array

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryarrayYesArray of arrays / elements (null elements are ignored)

Examples​

Input

Definition

Output

[
[
"a",
"b",
"c"
],
[
"d",
"e",
"f"
]
]
{
"$$concat": [
"$[0]",
"$[1]"
]
}
[
"a",
"b",
"c",
"d",
"e",
"f"
]
[
[
"a",
"b",
"c"
],
[
"d",
"e",
"f"
]
]
{
"$$concat": [
[
"a",
null,
"c"
],
[
"d",
"e",
null
]
]
}
[
"a",
null,
"c",
"d",
"e",
null
]
null
{
"$$concat": [
[
"a",
"b",
"c"
],
null
]
}
[
"a",
"b",
"c"
]
null
{
"$$concat": [
[
"a",
"b",
"c"
],
"d",
[
"e"
]
]
}
[
"a",
"b",
"c",
"d",
"e"
]
[
[
"a",
"b",
"c"
],
"d",
[
"e"
]
]
{
"$$concat": "$"
}
[
"a",
"b",
"c",
"d",
"e"
]