Skip to content

Instantly share code, notes, and snippets.

@ricventu
Created March 24, 2018 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricventu/a67ae29278949722552976e980b767e6 to your computer and use it in GitHub Desktop.
Save ricventu/a67ae29278949722552976e980b767e6 to your computer and use it in GitHub Desktop.
Robo 3T collection export
records = [];
var cursor = db.getCollection('foo').find({}, {});
while(cursor.hasNext()) {
    records.push(cursor.next())
}
print(tojson(records));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment