sql >> Base de Datos >  >> NoSQL >> MongoDB

MongoDB:¿cómo comparar $ tamaño de matriz con otro elemento de documento?

Puedes usar un $where consulta:

db.turnys.find({ $where: "this.users.length == this.seats" })