MongoDB - Filter data with OR condition

Professionaluser
Posted by Professionaluser under Sql Server category on | Points: 40 | Views : 876
To do OR condition kind of filter, we can use a logical disjunction (OR) for a list of query conditions by using the $or query operator.

Sample code:

>db.Person.find( { $or: [  { "name": "XYZ" }, { "MailID": "abc1234@gmail.com" } ] } )

Comments or Responses

Login to post response