get

open operator override fun get(key: String): BsonValue?


operator fun get(key: String, defaultValue: BsonValue): BsonValue

If the document does not contain the given key, return the given default value. Otherwise, gets the value of the key.

Return

the value of the key as a BsonValue

Parameters

key

the key

defaultValue

the default value