I have a column in MYSQL table from which I want to get object's first value, and I don't know what is the kay name. Values are like:
{"5":"ABC"}
{"8":"CDE"}
I have tried JSON_EXTRACT, JSON_KEYS but nothing work for me.
I have a column in MYSQL table from which I want to get object's first value, and I don't know what is the kay name. Values are like:
{"5":"ABC"}
{"8":"CDE"}
I have tried JSON_EXTRACT, JSON_KEYS but nothing work for me.
Below query worked for me:
SELECT json_extract(json_data,'$[0].*') from table
For detailed documentation, go through JSON_EXTRACT once.