【发布时间】:2012-11-07 07:30:07
【问题描述】:
这里是MongoDB新手...
我有一个收藏如下...
> db.students.find({_id:22},{scores:[{type:'exam'}]}).pretty()
{
"_id" : 22,
"scores" : [
{
"type" : "exam",
"score" : 75.04996547553947
},
{
"type" : "quiz",
"score" : 10.23046475899236
},
{
"type" : "homework",
"score" : 96.72520512117761
},
{
"type" : "homework",
"score" : 6.488940333376703
}
]
}
如何通过 mongo shell 只显示测验分数?
【问题讨论】:
标签: mongodb mongo-shell