Skip to main content

intersection

intersection removes all items from the input context that are not in the operand.

ContextType
Inputany set or collection
Outputa set or collection the same type as the input
ParameterType
operanda set or collection of the same type as the input

Examples

Finds all people with the same name as missing people (assumes missing person notices are modelled as objects in the realm):

objects(type="person").get("name").intersection(objects(type="missing-person-notice").get("name"))

Notes

If you're working with sets of objects or areas, you probably don't need to use intersection - just add the restriction into the object function call. For example, if you want to find all people who are also missing, you could do:

objects(type="person", missing=true)