I have a commodity_price table within Firestore having the following structure -
collection / document / collection / document / field
Following is the type of the information contained -
commodity_price (the table) / city / commodity / date / price
Questions -
- How do I get a list of all the cities in the table?
- How do I get a list of cities having data for a specific date?
I tried using the following code but returns 0 records -
docs = db.collection('commodity_price').get()
for doc in docs:
print(doc.to_dict())