Firebase Firestore Guides show how to iterate documents in a collection snapshot with forEach:
forEach
db.collection(\"cities\").get().then(function(que
Here's another example
var favEventIds = ["abc", "123"]; const modifiedEvents = eventListSnapshot.docs.map(function (doc) { const eventData = doc.data() eventData.id = doc.id eventData.is_favorite = favEventIds.includes(doc.id) return eventData })