How can I get the value of coursestatus from all of the collections?
coursestatus
2
See Get all documents in a collection
You loop or iterate over it.
const querySnapshot = await getDocs(collection(db, "cities")); querySnapshot.forEach((doc) => { // doc.data() is never undefined for query doc snapshots console.log(doc.id, " => ", doc.data()); });
If you want to get the value of coursestatus field which exists in multiple CourseCompletion sub-collections, then you have to perform a collection group query.
CourseCompletion
Click here to cancel reply.
2
Answers
See Get all documents in a collection
You loop or iterate over it.
If you want to get the value of
coursestatus
field which exists in multipleCourseCompletion
sub-collections, then you have to perform a collection group query.