Reputation: 1161
How to pass complex get query parameters such as where order etc into GET https://firestore.googleapis.com/v1beta1/{name=projects/*/databases/*/documents/*/**}
(firestore docs) ?
Upvotes: 2
Views: 377
Reputation: 2982
You can order and limit data in a Cloud Firestore query after using the Get Data method like this:
myDinoRef.where("type", "==", "TREX").orderBy("size", "desc").limit(2)
This will return all TRex Dinos and order by descending "size". It will also limit the result set to two rows.
Google's documentation is pretty good and ever evolving. It's also important to point out that the Cloud Firestore is still in beta (as of today)
Upvotes: 1