I have some trouble with the docs of firestore and their best practices in order to query subcollections and the parent document. I trying to query inside my firebase function with Typescript.
The DB:
├── User (Collection)
│ └── User (Document with ID)
│ │ └── Plan (Subcollection)
I have a list of user IDs in a array which I need to collect information from the user document and from the subcollections plan the current document.
.where("id", in, idArray).get()
But how tho get the Data from the User document and the subcollection (Plan) document (current) I don't know the most efficient way to query in the scenario and the documentation is not really clear for me.
Thanks