Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.data/JsonPath/Companion/root

root

@JvmStatic
fun root(key: String): JsonPath<JsonPath.Component.Key>

Starts configuring a JsonPath that should be applied to a JSON object.

Additional JsonPath components can be appended through the returned JsonPath via the JsonPath.key and JsonPath.index methods.

Return

The JsonPath used to continue configuring this JsonPath

Parameters

key

The key name used to extract the first item in the json object


@JvmStatic
fun root(index: Int): JsonPath<JsonPath.Component.Index>

Starts configuring a JsonPath that should be applied to a JSON array.

Additional JsonPath components can be appended through the returned JsonPath via the JsonPath.key and JsonPath.index methods.

Return

The JsonPath used to continue configuring this JsonPath

Parameters

index

The index used to extract the first item in the json array

Generated by Dokka
(c) Tealium 2026