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

# insertAwait

`suspend fun MongoClient.insertAwait(collection: String, document: JsonObject): String`

Insert a document in the specified collection

### Parameters

`collection` - the collection

`document` - the document

`resultHandler` - result handler will be provided with the id if document didn't already have one

Return