MongoDB get all values of 1 field
问题 So I know that in mongodb, I can get all values and then iterate through them but I was wondering if in mongodb there is an option to get only a certain field. So for example suppose my collection is structured as follows: {_id: { field1,field2,field3} } {description: { field1,field2,field3, data:{ field1,field2,field3 } } } {otherdata: {field1,field2,field3} } Now, I need the value of description.data.field1 so any suggestions on how to do that? So far I have tried using following commands: