Skip to content

Instantly share code, notes, and snippets.

@markreale
Created May 28, 2019 12:00
Show Gist options
  • Save markreale/47ebfea015630ac433f7173e2d3a9f5e to your computer and use it in GitHub Desktop.
Save markreale/47ebfea015630ac433f7173e2d3a9f5e to your computer and use it in GitHub Desktop.
Firestore - Reading and Referencing Data
db.collection("things").get().then((querySnapshot) => {
querySnapshot.forEach((doc) => {
// Code for handling each entry returned from the database
// ID for each Document in the Collection can be referenced with: doc.id
// Data for each Document in the Collection can be referenced with: doc.data()
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment