elemMatch

fun elemMatch(field: String, value: Condition): Condition

Creates an element match condition for array fields. Matches documents where at least one element in the specified array field matches the given condition.

Return

A new element match condition.

Parameters

field

The array field name to check.

value

The condition that at least one array element must match.