get object for all my documents in Cloud Firestore
问题 I want to send a JSON of all my docuements in Firestore from my backend created with express The Firestore docs says how to get all documents but the method is with forEach and express can send only once the response. So the problem is that I don't know how to render all forEach in a variable to send once for the headers This is the code of Firestore docs: db.collection('users').get() .then((snapshot) => { snapshot.forEach((doc) => { console.log(doc.id, '=>', doc.data()); }); }) .catch((err)