# db.command.in

Query filter, indicating that the value of a field is required to be within the given array.

Method signature:

function in(values: any[]): Command

Sample code

Find out the todos whose progress is 0 or 100

const _ = db.command
db.collection('todos').where({
  progress: _.in([0, 100])
})
.get({
  success: console.log,
  fail: console.error
})
点击咨询小助手