If I make a call from Node to Firestore like this:
const notesQuery = query(documents, where('noteType', '==', 'private'));
const notesDocs = await getDocs(notesQuery);
How do I send all of the docs to the frontend?
The Firebase documentation uses a foreEach()
to loop through the docs that are returned. But is it possible to send the response to the frontend without looping through first?