Expose subcollections as json fields
Currently, subcollections are treated separately from fields in the UI. This seems like an arbitrary distinction - a subcollection is simply a json object under a document. You could do the same thing with a string field.
The API could support retrieving subcollections as string fields in json format for a document. This would prevent the need to iterate over every document in a collection, then get a list of the subcollections, then retrieve the documents from those subcollections, etc. If worried about time required, since Firestore supports 100 nesting levels, perhaps the API call could include the nesting level to output and truncate the output accordingly.
1
vote
Stefen Hillman
shared this idea