Othman Abdealziz
Othman Abdealziz

Reputation: 47

how to access firestore subcollection using cloud functions

i have the following database model: car Workshops collection which is the root collections, and it has collections based on car Brands for example car Workshops ==> KIA(collection) and KIA collection have some fields and another sub collections called workshops

as following car Workshops ==> Kia (collection) ==> workshops

so i wants my code to return the wokrshops which is inside kia collection

screenshots of my database

enter image description here

Upvotes: 0

Views: 467

Answers (1)

Gie
Gie

Reputation: 103

U can use collection group query with specified document id. Try this, its work for me. CollectionGroupQuery but limit search to subcollections under a particular document

Upvotes: 2

Related Questions