(Available from september 2023 release)

The difference function finds the values that are in set A but not in set B

Description

Finds the difference of two sets

Example

Finds the elements in the first set that are not part of the second set.

difference(
  union("A", "B"),
  union("B", "C", "D")
)

Will give result “A”

Example

Find jobs that are installed on instance ‘test-1’ but not on ‘test-2’.

difference(
    instance[name = 'test-1']/task/id,
    instance[name = 'test-2']/task/id
)

Syntax

difference(expression, expression)

Parameters

Type Description
Expresssion Expression that gives a set of values
Expresssion Expression that gives a set of values

← intersect function / round function →

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment