# extract

inline fun <T : Any> ExpressionWithColumnType<*>.extract(vararg path: String, toScalar: Boolean = true): Extract<T>

Returns the extracted data from a JSON object at the specified path, either as a JSON representation or as a scalar value.

#### Parameters

path

String(s) representing JSON path/keys that match fields to be extracted. If none are provided, the root context item `'$'` will be used by default. Note: Multiple path arguments are not supported by all vendors; please check the documentation.

toScalar

If `true`, the extracted result is a scalar or text value; otherwise, it is a JSON object.

#### Samples

org.jetbrains.exposed.v1.json.JsonColumnTests.testJsonExtractWithArrays