Skip to content

Instantly share code, notes, and snippets.

@dmcassel
Last active September 14, 2015 17:52
Show Gist options
  • Save dmcassel/97675717aec32f968827 to your computer and use it in GitHub Desktop.
Save dmcassel/97675717aec32f968827 to your computer and use it in GitHub Desktop.
// fn.collection(), and most things that interact with the database, returns a ValueIterator
// The ES6 for…of loop automatically iterates.
for (var doc of fn.collection()) {
var user = doc.toObject();
// Do something with the object...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment