Skip to main content
Skip table of contents

JOIN

The JOIN function is used to concatenate multiple strings with a specified delimiter in between for a given JSONPath array.

Usable: Value Fields, Context Filter

Syntax: { JOIN((PARAM_1 PARAM_2)) }

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

String

'|'
'&'

Character used as delimiter

Value Field Example

For example, consider the following data source JSON:

CODE
{
  "result": [
    {
      "name": "Mario",
    },
    {
      "name": "Luigi",
    }
  ]
}

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

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

This will result in Mario & Luigi

Context Filter Example

Use the JOIN function to build part of a regular expression by concatenating the values with the pipe symbol

CODE
$.result[?(@.name=~/({ JOIN(( $.issue.fields.customfield_10XXX[*].value '|' )) })/g )]

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

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

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.