I'm trying to remove the keys from a mongoengine Document in python:
document.update(unset__name=True)
document.update(unset__surname=True)
document.update(unset__dob=True)
...
but instead of the above I would like to loop through them and use a variable, something like:
document.update(unset__<key>=True)
Is this possible?
dictdynamically and then pass it todocument.update