mongodb add key value to all documents
db.your_collection.update_many({}, {"$set": {"new_field": "value"}}, upsert=False, array_filters=None)
Source: stackoverflow.com
db.your_collection.update_many({}, {"$set": {"new_field": "value"}}, upsert=False, array_filters=None)