popFirst

abstract fun Field<T, Collection<*>>.popFirst()(source)

Removes the first element in the specified array.

Example

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

collection.updateOne(
fiilter = {
User::name eq "Bob"
},
update = {
User::scores.popFirst()
}
)

External resources