Skip to content

Version 21: Array contains query operator

Compare
Choose a tag to compare
@grahamearley grahamearley released this 14 Sep 11:51
5896447

This version adds a new operator for querying. You can now query for documents with an array field that contains some value. For example, say you have a collection "My Collection" of documents that each have an array field called numbers. To find all documents with 42 in their numbers array, you can now query like this:

firestore.query("My Collection").where("numbers", "contains", 42).execute();

Thanks to @joao-azevedo-hydradev for this addition!