vertx / io.vertx.kotlin.ext.mongo / io.vertx.ext.mongo.MongoClient / findOneAndReplaceAwait

# findOneAndReplaceAwait

`suspend fun MongoClient.findOneAndReplaceAwait(collection: String, query: JsonObject, replace: JsonObject): JsonObject`

Find a single matching document in the specified collection and replace it.

### Parameters

`collection` - the collection

`query` - the query used to match the document

`replace` - the replacement document

`resultHandler` - will be provided with the document, if any

Return