Skip to main content

Hi, I´m looking for an example of a firestore query to select a single record.  I know the doc ID I want to select.

Please only real examples, and no suggestions to read the documentation - its “poor” (being really polite).  

 


"where": { "fieldFilter": { "field": { "fieldPath": "__name__" }, "op": "EQUAL", "value": { "referenceValue": "projects/adventure-hunt-323xxx/databases/(default)/documents/CollectionName/xxxxxxxxxxx } } },

 

xxxxxxxxxxxx is the value I want to search for.

Solved.  By removing the orderby part of the query it worked fine.


Thanks so much for circling back to share your solution here, @Tenerifekiwi! I’m sure it’ll be helpful to a lot of folks in Community that might be facing the same issue. 🤗