Created
April 6, 2016 23:01
-
-
Save AlexandreProenca/83cf7f65b4e04f26ff41a5f908febcc6 to your computer and use it in GitHub Desktop.
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
from pymongo import MongoClient | |
client = MongoClient() | |
db = client.sbhistory | |
cursor = db.room.find() | |
for document in cursor: | |
document['payload']['details']['users_name'] = [{"username": i, "seen": None, "received": None} for i in document['payload']['details']['users_name']] | |
db.room2.insert(document) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment