Firebase Firestore Guides show how to iterate documents in a collection snapshot with forEach:
forEach
db.collection(\"cities\").get().then(function(que
// https://firebase.google.com/docs/firestore/query-data/get-data const querySnapshot = await db.collection("students").get(); // https://firebase.google.com/docs/reference/js/firebase.firestore.QuerySnapshot?authuser=0#docs querySnapshot.docs.map((doc) => ({ id: doc.id, ...doc.data() }));