popLast
Removes the last 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.popLast()
}
)Content copied to clipboard