I have a DB field called data
of type is MEDIUMTEXT, which stores values in JSON format. I'm using extract_json_value
method from common_schema
.
When JSON is not nested, it works fine. For example, when applications_data
table's data
field is
{
"key": "value"
}
This query works fine:
SELECT data into @json from applications_data;
SELECT common_schema.extract_json_value(@json, 'key') as result;
and gives result: key
However, when the data field is a nested JSON, it fails. For example, JSON is:
{
"key": {
"overview": "sample"
}
}
Using the same query as above and result is empty, not NULL: