Skip to content

Tag: mongodb

MongoDB update object rather than insert a new one

Using collection.insert_one(json_dict)inserts a new collection Can I do collection.insert_one() on an already existing object so it then updates. My object will look something like: Then under “Age” I want to add “Location”: “New York’, how’d I do that using PyMongo A…