Skip to main content
The $in operator matches documents where the field value equals any one of the specified values. This is useful when you want to filter by multiple acceptable values without writing separate conditions. The operator takes an array of values and returns documents where the field matches at least one value in the array. This is equivalent to combining multiple $eq conditions with a logical OR.

Compatibility

Field TypeSupported
TEXTYes
U64/I64/F64Yes
DATEYes
BOOLYes

Examples

// Match any of several categories
await products.query({
  filter: {
    category: {
      $in: ["electronics", "accessories", "audio"],
    },
  },
});