Skip to content

Instantly share code, notes, and snippets.

@toothfairy
Created January 17, 2019 20:02
Show Gist options
  • Save toothfairy/abb80f195fe4100c2abbb218dab1cd3d to your computer and use it in GitHub Desktop.
Save toothfairy/abb80f195fe4100c2abbb218dab1cd3d to your computer and use it in GitHub Desktop.
Robo 3T export to json
var cursor = db.getCollection('foo').find({}, {});
while(cursor.hasNext()) {
print(tojson(cursor.next()))
}
@toothfairy
Copy link
Author

let cursor1 = db.getCollection('exchanges').find({createdAt: { $gte: ISODate("2019-01-01 00:00:00.082Z") } });
while(cursor.hasNext()) {
print(tojson(cursor.next()))
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment