Answers for "getting data from firestore using async await"

1

getting data from firestore using async await

const logCities = async () => {
  let citiesRef = db.collection('cities');
  let allCities = await citiesRef.get();
  for(const doc of allCities.docs){
    console.log(doc.id, '=>', doc.data());
  }
}
Posted by: Guest on July-02-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language