# 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 cloud = require('wx-server-sdk')
cloud.init()
const db = cloud.database()
const _ = db.command
exports.main = async (event, context) => {
  try {
    return await db.collection('todos').where({
      progress: _.in([0, 100])
    })
    .get()
  } catch(e) {
    console.error(e)
  }
}