📜  mongoose 查询中的数组计数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:25.358000             🧑  作者: Mango

代码示例3
{ “countries.1” : { '$exists' : true } }

//will do what you want. If you want $gt : 3, you would use countries.3 as array indexes starts at 0.