I would like to execute a following query:
db.mycollection.find(HAS IMAGE URL)
What should be the correct syntax?
In an ideal case, you would like to test for all three values, null, "" or empty(field doesn't exist in the record)
You can do the following.
db.users.find({$and: [{"name" : {$nin: ["", null]}}, {"name" : {$exists: true}}]})