IN Operator
The IN operator is essentially a compact alternative to a number of OR-ed equality conditions. This operator allows you to specify multiple values in a WHERE clause.
Example: Fetch tag number for the customers
"Lucinda Beckman",
"Adam Phillips","Zina Christenson","Fallon
Clements"
.SELECT bagdet.fullName, bagdet.bagInfo[].tagNum
FROM BaggageInfo bagdet
WHERE bagdet.fullName IN
("Lucinda Beckman", "Adam Phillips","Zina Christenson","Fallon Clements")
Explanation: You fetch the tag numbers of a list of passengers. The list of passengers to be fetched can be given inside an IN clause.
Output:
{"fullName":"Lucinda Beckman","tagNum":"17657806240001"}
{"fullName":"Zina Christenson","tagNum":"17657806228676"}
{"fullName":"Adam Phillips","tagNum":"17657806255240"}
{"fullName":"Fallon Clements","tagNum":"17657806255507"}