(14)mongodb aggregate聚集框架
时间:2021-07-01 10:21:17
帮助过:29人阅读
"result" : [
{
"_id" :
5,
"avg" :
3700
},
{
"_id" :
4,
"avg" :
2297
},
{
"_id" :
3,
"avg" :
1746.0666666666666
},
{
"_id" :
2,
"avg" :
823.33
},
{
"_id" :
8,
"avg" :
75.33333333333333
},
{
"_id" :
15,
"avg" :
70
},
{
"_id" :
14,
"avg" :
54
},
{
"_id" :
13,
"avg" :
33.5
},
{
"_id" :
11,
"avg" :
31
}
],
"ok" :
1
}
View Code
输出结果为json,一个result,一个ok;result中json数组,存放结果,ok的值是1
(14)mongodb aggregate聚集框架
标签:group res mongo show 常用 hide 等于 match limit