Description
Parses the first argument as a JSON string and returns the string value of the element pointed to by the path in the second argument
Syntax
JSON_EXTRACT_PATH_TEXT(expression, path)
Parameters
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| json | JSON value or string | JSON or string | Yes |
| path | JSON path to the value to extract | JSON path | Yes |
Notes
- Parser aliases normalize to JSONExtractScalar → JSON_EXTRACT_SCALAR mapping.
Example
SELECT
JSON_VALUE(json_col, '$.email')
FROM
my_table t;