Created
May 11, 2017 11:57
-
-
Save anstak/8a8cb436bbd97636f5f64438cb2c6d2f to your computer and use it in GitHub Desktop.
MongoDB export
This file contains 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
global_log = {}; | |
var cursor = db.getCollection('log').find({}, {}); | |
while(cursor.hasNext()) { | |
var obj = cursor.next(); | |
delete obj._id; | |
if (obj.result) { | |
if (obj.result._id) delete obj.result._id; | |
global_log[obj.active_period_id] = obj; | |
} | |
} | |
print(tojson(global_log)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment