MongoDB - Query data using multiple conditions

Posted by Professionaluser under Sql Server category on | Points: 40 | Views : 275
We can filter the collection data with multiple conditions by using logical AND operator. Also, we can separate the multiple conditions with comma in the conditions document.

below is the sample code,

>db.Person.find( { "name": "XYZ", "MailID": "" } )

Above command returns the documents which satisfy the both conditions Name=XYZ and

Comments or Responses

Login to post response