聚合操作in提示参数不对
代码:
const db = getApp().globalData.db const $ = db.command.aggregate db.collection( 'lyriclist' ).aggregate() // .count('count') .project({ first: $. in ( 'aaa' , '$collected' ), }) // .skip() // .limit(10) .sort({ createTime: - 1 }) .end({ success: console.log, fail: console.error }) |
结果: