Containing none

Learn how to check if a collection does not contain any element of another.

This operator checks whether one collection has no elements in common with another. It is the opposite of the containing all operator.

Note that the result is always true if the second collection is empty, as the empty set is a subset of every set.

Also, keep in mind that neither the order nor duplicate elements affect the result since collections are treated as sets.

Syntax

The basic syntax is:

with /*<property>*/ containing none of /*<collection>*/

Alternatively, you can use the including keyword:

with /*<property>*/ including none of /*<collection>*/

The negation of this operation can be expressed as:

with /*<property>*/ not containing none of /*<collection>*/

Using the alternative syntax:

with /*<property>*/ not including none of /*<collection>*/

Parameters

These are the supported parameters:

name

The name of the event property to search for in the collection.

collection

The collection to check.

Examples

Check if a product was abandoned without specific categories:

user has viewed post with tags containing none of ["summer", "sport"]
Try in Playground

Or to check the opposite:

user has viewed post with tags not containing none of ["summer", "sport"]
Try in Playground