How to iterate through a Firestore snapshot documents while awaiting
问题 I have been trying to obtain a series of documents from firestore, reading them and acting accordingly depending on a series of fields. The key part is I want to wait for a certain process while working on each document. The official documentation presents this solution: const docs = await firestore.collection(...).where(...).where(...).get() docs.forEach(await (doc) => { //something }) The problem with this solution is taht when you have a promise inside the forEach it won't await it before