can I use combination of OR and AND in mongodb queries?
the code below doesn\'t work as expected
db.things.find({
$and:[
{
db.things.find( {
$and : [
{
$or : [
{"first_name" : "john"},
{"last_name" : "john"}
]
},
{
"Phone":"12345678"
}
]
} )
AND takes an array of 2 expressions OR , phone.
OR takes an array of 2 expressions first_name , last_name.
AND
OR
Phone Number.
Note: Upgrade to latest version of MongoDB, if this doesn't work.