How do you query for “is not null” in Mongo?
I would like to execute the following query:
db.mycollection.find(HAS IMAGE URL)
What should be the correct syntax?
The query for mongodb not null in pymongo you can use the following query:-
db.mycollection.find({"IMAGE URL":{"$ne":None}});
This is because pymongo represents mongo "null" as python "None".