isNotEmpty

Matches documents in which an array is not empty.

Example

Return all users that have one or more grades.

class User(
val name: String?,
val grades: List<Int>
)

collection.find {
User::grades.isNotEmpty()
}

See also