Created
February 4, 2020 15:56
-
-
Save Eomm/03210ced5adf802600b01b74acc6dde4 to your computer and use it in GitHub Desktop.
Mongo copy-paste
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
db.getCollection("aaaaaaa").find({}).limit(10) | |
.forEach(function(i) { | |
delete i._id; | |
i._id = UUID().toString().split('"')[1] | |
i.when = new Date(); | |
i.userId = "from_ONE_2_TWO"; | |
db.getCollection("aaaaaaaa").insert(i); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment