elemMatch

@JvmName(name = "elemMatchExt")
infix fun <T> KProperty<Iterable<T>?>.elemMatch(filter: Bson): Bson

Creates a filter that matches all documents containing a property that is an array where at least one member of the array matches the given filter.

Return

the filter

Parameters

filter

the filter to apply to each element


fun <T> elemMatch(property: KProperty<Iterable<T>?>, filter: Bson): Bson

Creates a filter that matches all documents containing a property that is an array where at least one member of the array matches the given filter.

Return

the filter

Parameters

property

the data class property

filter

the filter to apply to each element