【发布时间】:2021-03-12 02:47:34
【问题描述】:
尝试在聚合中从string 转换为int 会引发以下错误:$limit should be a number not object or string。这是我的查询:
{ $limit: { "$convert": { "input": "10", "to": "int" } } }
或
{ $limit: { $toInt: "5" } }
更多详情:
【问题讨论】:
标签: mongodb mongodb-query aggregation-framework bson