Skip to content Skip to sidebar Skip to footer

Mongodb Where Clause

I have mongoDB 'users' collection in JSON format and I want to return all the data having privacy is true. How can I do it ? { 'name' : 'Maria Kari', 'social' : [

Solution 1:

db.users.find( { 
    $or:[{ 'social.privacy': true },{'personal.privacy': true}] 
)

Post a Comment for "Mongodb Where Clause"