I have a collection like this:
_id: {name: 'name', family: 'family'}
i want to remove some objects by _id using by $in, how i can do this? for example my query should be something like:
db.persons.remove({_id: {$in: [ { name: 'name1', family: 'family1' }
, { name: 'name2', family: 'family2' }
]
}
})
db.persons.remove({_id: {$in: [{family: 'family1', name: 'name1'}]}})nothing happened, but above query is working correctly.