SQL Reference
...
SQL Functions
JSON Functions
JSON_EXTRACT_PATH_TEXT
8min
The JSON_EXTRACT_PATH_TEXT() function extracts JSON nested value from a specified JSON value according to the defined path.
This function may be similar to the JSON_EXTRACT_PATH(). This function returns a value of type string instead of type JSON.
The JSON_EXTRACT_PATH_TEXT() syntax is shown below:
Syntax
|
ο»Ώ
The required arguments are explained below.
- from_json: the JSON value to extract.
- path: the path to extract.
Besides the syntax above, Oxla provides and supports the use of operators in queries. See the syntax below:
Another option
|
ο»Ώ
- from_json: the JSON value from which to extract.
- ::JSON: a symbol that casts the string literal to a JSON type.
- path: key of the field that we want to extract.
1) This example shows how to use the JSON_EXTRACT_PATH_TEXT() function to extract values ββfrom a JSON object at a specified index.
Run the following query:
Json extract path
|
ο»Ώ
or
Another option
|
ο»Ώ
2) The JSON_EXTRACT_PATH_TEXT() function extracts the values and returns the output below:
Output
|
ο»Ώ
ο»Ώ

Updated 31 Aug 2023
Did this page help you?