Mongodb – PyMongo – How to ignore a parameter in query
Is there a way to ignore a parameter when querying documents using PyMongo in one line? For example: db.find_one( { "first_name": firstname, "last_name": lastname, "age": age if age else <ignore this field from querying all together> } ):