kmongo / kotlin.collections / com.mongodb.client.MongoIterable / first

first

inline fun <T> MongoIterable<T>.first(crossinline predicate: (T) -> Boolean): T (source)

Returns the first element matching the given predicate.

Exceptions

NoSuchElementException - if no such element is found.