In

Learn how to check if an element exists in a collection.

This operator checks whether an element is in a collection. It works the same way as the containing operator, but in the opposite direction.

When comparing elements, this operator uses the same equivalence rules as the equal to operation.

Syntax

The basic syntax is:

with /*<name>*/ in /*<collection>*/

The negation of this operation can be expressed as:

with /*<name>*/ not in /*<collection>*/

Parameters

These are the supported parameters:

name
any

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

collection

The collection to check.

Examples

Check if a post with a specific tag was viewed:

user has viewed post with "news" in tags
Try in Playground

Or to check the opposite:

user has viewed post with "news" not in tags
Try in Playground