db.collection('test')
.aggregate()
.project({
hasBookings: $.reduce({
input: "$bookings",
initialValue: false,
//in: $.or(["$$value", $.not($.eq(["$$this.cancelled",true]))])
in: $.or(["$$value", $.neq(["$$this.cancelled", true])])
}),
})
.end()
这段代码在“云开发控制台”中执行会报错:
cannot read property 'neq'...
在本地调试执行是正确的
这是为啥呀?
是云开发控制台数据库的执行窗口里触发对吧?