Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

arrayIntersect(arrayName1, arrayName2)

Package

array

Alias

Pkg Usage

intersect(arrayName1, arrayName2)

Description

Excerpt
hiddentrue
Intersect between two arrays.

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

arrayName1

Array

Yes

First array.

arrayName2

Array

Yes

Second array.

Return Type

Array

...

Example

Code Block
string[] developers= usersInGroups({"jira-developers"});
string[] administrators = usersInGroups({"jira-administrators"});
return arrayIntersect(developers, administrators);

The result returned by the routine is an array that contains the unique elements found in both developers and administrators groups.

The above code can be written also as shown below:

Code Block
return usersInGroups({" jira -developers ", " jira -administrators "});

That's it.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "array_routine" and space = currentSpace ( )
labelsarray_routines