Skip to content

select

inline fun <T> Bson.select(field: Field<*, T>): Sequence<T>

Finds all values that match field in a given BSON document.

To learn more about the syntax, see BsonPath.

Example

val document: Bson = 

document.select(User::profile / Profile::name)

will return a sequence of all values matching the path profile.name.

See also

  • at: Select a single value.