mergeObjects

fun <TExpression> mergeObjects(property: KProperty<*>, expression: TExpression): BsonField

Gets a field name for a $group operation representing the result of merging the fields of the documents. If documents to merge include the same field name, the field, in the resulting document, has the value from the last document merged for the field.

Return

the field @mongodb.driver.manual reference/operator/aggregation/mergeObjects/ $mergeObjects

Parameters

property

The data class property

expression

the expression

the expression type