python - Mongodb中数组元素的个数统计
巴扎黑
巴扎黑 2017-04-17 17:45:07
0
1
552

集合中的记录格式如下:

{"ID":"0001",
 "Fir":"0",
 "Sec":"1",
 "FirCard_NE":["0402003","0101002","0201001","0503001","0402003","0204001","0204002","0301001","0101001","0402003","0501001","0501002","0503001","0503002","0501002"],
 "SecCard_NE":["0101001","0101001","0201001","0202001","0203001","0204001","0204002","0301001","0301004","0204001","0501001","0501002","0503001","0503002","0301004"]
}

现在想统计在"Fir"为"0"的情况下,FirCard_NE字段中某个数组元素在整个集合中出现的次数
(如统计在"Fir"为"0"的情况下,FirCard_NE中出现"0402003"的总次数)

巴扎黑
巴扎黑

全部回覆(1)
黄舟

雷雷

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!