I am using firestore
I have health name collection
collection health
doc customername
collection customerinfo // multiple
doc customerwardinfo
Code:
firebase.firestore()
.collection("health")
.doc('customername')
.get()
.then((data)=>{
console.log("customer data",data);
})
i am using the above code but not getting data. i want to use for each for some sub collections. but i am not able to implement it. how i will get all data. suppose a collection has 10 docs. then use foreach for each doc and get data from each doc.