沿着在陣列中的有價票券我有一個蒙戈收藏的東西,如以下:(蒙戈)我怎麼能得到與大小
{
"_id" : ObjectId("59e013e83260c739f029ee21"),
"createdAt" : ISODate("2017-10-13T01:16:24.653+0000"),
"updatedAt" : ISODate("2017-11-11T17:13:52.956+0000"),
"age" : NumberInt(34),
"attributes" : [
{
"year" : "2017",
"contest" : [
{
"name" : "Category1",
"division" : "Department1"
},
{
"name" : "Category2",
"division" : "Department1"
}
]
},
{
"year" : "2016",
"contest" : [
{
"name" : "Category2",
"division" : "Department1"
}
]
},
{
"year" : "2015",
"contest" : [
{
"name" : "Category1",
"division" : "Department1"
}
]
}
],
"name" : {
"id" : NumberInt(9850214),
"first" : "john",
"last" : "afham"
}
}
現在我怎麼能拿誰擁有的文件數量競賽名稱爲組別超過一次或2次以上......等等
我試圖用規模和$ GT,但不能形成正確的結果
粘貼集合中的示例數據。這個數據看起來不對 – Astro
看起來像上面的數據是不正確的 – Sam
@astro我已經更新json數據,這是100%喜歡從集合中提取 –