Created
February 25, 2017 15:05
-
-
Save wichopy/24a8c0cc1604d3ac45b81994477f30e3 to your computer and use it in GitHub Desktop.
Find and modify one document in Mongo DB
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.tweets.findAndModify({query: {"likes" : null},update:{$set: {"likes": []}},new: true, upsert: true }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment