intersection
intersection
removes all items from the input context that are not in the operand.
Context | Type |
---|---|
Input | any set or collection |
Output | a set or collection the same type as the input |
Parameter | Type |
---|---|
operand | a 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)