I need to perform an operation after I retrieve all of the docs from firebase, but getDocs don't allow for .then.
There's a post that has an example but it's more than I think I need and I still don't understand how to implement the solution.
Here's the code:Using getDoc().then() inside of a loop Firebase
const q = this.itineraryService.findData(filters);
const querySnapshot = await getDocs(q);
querySnapshot.forEach((doc) => {
this.array.push({ ...doc.data(), id: doc.id});
});
I'd like to be able to just add a .then to the last ) but it doesn't allow that. So how can I wait until I get all of the docs before performing the next operation.