ascending

abstract fun ascending()(source)

Sort array elements in ascending order (for simple values, not documents).

Example

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

collection.updateOne(
filter = {
User::name eq "Bob"
},
update = {
User::tests push {
each(40, 60)
sort { ascending() }
}
}
)