I need to query Firestore and the Firestore structure:
root-->payment-->(user IDs)--->(random doc ID)-->(data like paymentid: 1234, paid: 50)
(col) (doc) (col) (doc) (fields)
My query is like I need to get all values whose paid>0 is my query.
What I have tried is?
var query = FirebaseFirestore.instance;
query.collection("root").where("paid",">",0);
But it didn't return any data and I know this is not the correct format. How can achieve this?
Can even I query this structure using Flutter? or Is there any better structure to implement?