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

$.result[*].name

$.issue.fields.customfield_X[*].value

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",
    }
  ]
}
CODE

Use the QUOTED_JOIN function to concatenate the JSONPath names with the & symbol

{ QUOTED_JOIN(($.result[*].name '&')) }
CODE

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 )]
CODE

If $.issue.fields.customfield__X contains a list of Mario and Luigi the expression will result in:

$.result[?(@.name=~/('Mario'|'Luigi')/g )]
CODE