Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.data/JsonPathExtractable/extract

extract

abstract fun extract(jsonPath: JsonPath<TRoot>): DataItem?

Extracts a nested DataItem according to the given jsonPath.

If any path component is not found, either missing or unexpected type, then null will be returned.

Return

The required DataItem if available; else null

Parameters

jsonPath

The JsonPath describing how to access the variable.


open fun <T> extract(jsonPath: JsonPath<TRoot>, converter: DataItemConverter<T>): T?

Extracts a nested DataItem according to the given jsonPath, and attempts to convert it to the type T using the given converter

If any path component is not found, either missing or unexpected type, then null will be returned.

Return

The required DataItem converted to type T if available; else null

Parameters

jsonPath

The JsonPath describing how to access the variable.

Generated by Dokka
(c) Tealium 2026