mongodb select all text not null

Solutions on MaxInterview for mongodb select all text not null by the best coders in the world

showing results for - "mongodb select all text not null"
Juan Pablo
31 Jan 2018
1//This will return all documents with a key called "IMAGE URL", but they may still have a null value.
2db.mycollection.find({"IMAGE URL":{$exists:true}});
3
4//This will return all documents with both a key called "IMAGE URL" and a non-null value.
5db.mycollection.find({"IMAGE URL":{$ne:null}});