mongodb - Query mongo document to return all rows in a field -


for example, if have name field in mongo document person. in sql, query select name person; return names. equivalent in mongo?

i thinking db.person.find(<<what fill here>>, {name: 1});

i trying retrieve names while using mongo console.

an empty json object {} matches documents.

db.person.find({}, {name: 1}); 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -