# db.command.and

Query command. Describes the logical "and" relationship, indicating that multiple query filter conditions need be met at the same time.

Sample code

Filter out todos whose progress is greater than 50 and less than 100:

Streaming writing:

const _ = db.command
db.collection('todo').where({
  progress: _.gt(50).and(_.lt(100))
})

Pre-writing:

const _ = db.command
db.collection('todo').where({
  memory: _.and(_.gt(50), _.lt(100))
})