QUOTED_JOIN
The QUOTED_JOIN function is used to concatenate multiple strings with a specified delimiter in between for a given JSONPath array. In addition all strings are surrounded by single quotes.
Usable: Value Fields, Context Filter
Syntax: { QUOTED_JOIN((PARAM_1 PARAM_2 PARAM_3)) }
Parameter | Type | Examples | Description |
---|---|---|---|
PARAM_1 | JSONPath array |
| The JSONPath expression representing the array that should be concatenated. |
PARAM_2 | Optional string |
| Character used as delimiter |
PARAM_3 | Optional string |
| Character used as quotes |
Value Field Example
For example, consider the following data source JSON:
{
"result": [
{
"name": "Mario",
},
{
"name": "Luigi",
}
]
}
Use the QUOTED_JOIN function to concatenate the JSONPath names with the &
symbol
{ QUOTED_JOIN(($.result[*].name '&')) }
This will result in 'Mario' & 'Luigi'
Context Filter Example
Use the QUOTED_JOIN
function to build part of a regular expression by concatenating the values with the pipe symbol
$.result[?(@.name=~/({ QUOTED_JOIN(( $.issue.fields.customfield_10XXX[*].value '|' )) })/g )]
If $.issue.fields.customfield__X
contains a list of Mario
and Luigi
the expression will result in:
$.result[?(@.name=~/('Mario'|'Luigi')/g )]