Containing
Learn how to check if a collection contains a specific element.
This operator checks whether a collection contains a certain element. It works the same way as the in operator, but in the opposite direction.
When comparing elements, this operator uses the same equivalence rules as the equal to operator.
Multi-condition criteria
You can combine conditions to create more advanced criteria.
Syntax
The basic syntax is:
with /*<name>*/ containing /*<element>*/
Alternatively, you can use the including keyword:
with /*<name>*/ including /*<element>*/
The negation of this operation can be expressed as:
with /*<name>*/ not containing /*<element>*/
Using the alternative syntax:
with /*<name>*/ not including /*<element>*/
Parameters
These are the supported parameters:
- name
The name of the event property to check.
- elementany
The element to search for in the collection.
Examples
Check if a post with a specific tag was viewed:
user has viewed post with tags containing "news"
Or to check the opposite:
user has viewed post with tags not containing "news"