jsonObjectValueOrNull

fun JsonElement.jsonObjectValueOrNull(vararg keys: String): JsonObject?

Navigates to the nested element at keys and returns it as a JsonObject, or null if it is missing, JSON null, or not an object. Extension function on JsonElement.