Pymongo using $exists
collection.find({"$and":[ {"cwc":{"$exists": True}}, {"cwc":{"$ne": ""}}]})
This works for me.
collection.find({"cwc":{"$exists":True}})
The only difference is removed the first argument.
collection.find({"$and":[ {"cwc":{"$exists": True}}, {"cwc":{"$ne": ""}}]})
This works for me.
collection.find({"cwc":{"$exists":True}})
The only difference is removed the first argument.