getValueAtPath

fun JsonObject.getValueAtPath(keyPath: String): JsonElement?

Recursively retrieves a nested value from a JsonObject using a dot-notated key path.

Example: val dir = json.getValueAtPath("details.movement.dir")?.asString