我需要计算以下 mongo 文档中的内部记录(而且我还必须获取所有文档的计数),
"_id": ObjectId("503208f5b5db0135387d9249"),
"function": "getNumberOfRecords",
"graph": {
"AB1": {
"5028cbf7d7262c333a000cb0": 1,
"5028ede7d7262c333a0011fb": 1
},
"AB2": {
"5028ef9cd7262c333a001219": 1,
"5028fb9cd7262c333a001c7f": 1,
"5028fb9cd7262c333a001c80": 1,
"5028fefcd7262c333a002354": 1,
"50290d55d7262c333a0024e0": 1,
"502918c9d7262c333a0025c3": 1,
"502918c9d7262c333a0025c4": 1,
"50293220d7262c333a002727": 1,
"50293220d7262c333a002728": 1,
"50293220d7262c333a002729": 1,
"50293220d7262c333a00272a": 1,
"50295a5bd7262c333a003bbc": 1
},
"AB3": {
"5028ff00d7262c333a002363": 1,
"50295a5ed7262c333a003bcb": 1
},
"AB4": {
"50293fdfd7262c333a002977": 1
}
},
"nameFilter": "name",
"siteFilter": "sitename"
}
我需要结果,
AB1 > 2
AB2 > 12
AB3 > 2
同样地.....