getOrNull

fun JsonElement.getOrNull(vararg keys: String): JsonElement?

Navigates into nested children like get, but returns null if any key is missing or the value is JsonNull.

Extension function on JsonElement. Empty segments are ignored, as in get.

Return

the JsonElement at the path, or null if not found or JsonNull

Parameters

keys

one or more dot-separated key paths