get

Kotlin convenience method to allow expressing JsonPath items in a more succinct way:

val verbosePath = JsonPath.key("key")
.index(0)
.key("sub-key")

val shortPath = JsonPath["key"][0]["sub-key"]
verbosePath == shortPath // true

Return

a new JsonPath with additional Component.Key added


Kotlin convenience method to allow expressing JsonPath items in a more succinct way:

val verbosePath = JsonPath.index(1)
.index(0)
.key("sub-key")

val shortPath = JsonPath[1][0]["sub-key"]
verbosePath == shortPath // true

Return

a new JsonPath with additional Component.Index added