Last active
September 5, 2017 09:56
-
-
Save hicay/385ade8c61890cbffa7a69d42d5d7384 to your computer and use it in GitHub Desktop.
Revisions
-
hicay renamed this gist
Sep 5, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
hicay created this gist
Sep 5, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ /* 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));