Last active
September 5, 2017 09:56
-
-
Save hicay/385ade8c61890cbffa7a69d42d5d7384 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* get */ | |
records = []; | |
var cursor = db.getCollection('tasks').find({}, {}); | |
while(cursor.hasNext()) { | |
records.push(cursor.next()) | |
} | |
print(tojson(records)); | |
/* transfer */ | |
db.getCollection('tasks2').insertMany(tojson(records)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment