Command.lt(value: any): Command

View Markdown

Last edited on 2026-07-04

Supported on: Mini Program, Cloud Functions, Web

Query filter operator indicating that the value must be less than the specified value. You can pass a Date object to perform date comparisons.

Parameters

value: any

Return Value

Command

Example Code

Find todos with progress less than 50

const _ = db.command
db.collection('todos').where({
  progress: _.lt(50)
})
.get({
  success: console.log,
  fail: console.error
})