INTERSECT

This function returns a list with elements present in two lists simultaneously.

The returned list does not contain duplicates. The order is respected.


Bash
list1 INTERSECT list2 #Output: List


Examples

Parser expression

Description

Bash
[1, 1, 2, 3] INTERSECT [1, 3, 5]

This example returns

[1, 3]

Bash
["red", "blue", "blue"] INTERSECT ["blue", "yellow", "yellow"]

This example returns

["blue"]

Bash
linkedIssues() INTERSECT subtasks()

This example returns a list with all sub-tasks which are also linked to the current issue.

To achieve this, the following functions are used:

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

list1

list

Any type of text, number or issue list. Learn more about

working with lists

.

list2

list

Any type of text, number or issue list. Learn more about

working with lists

.

Output

This function returns a list