JSON_VALUE
Extract a scalar value from a JSON document. This function extracts a value from a JSON document at a given path and returns it as a scalar.
Syntax
JSON_VALUE(json_doc, path)Description
Examples
SELECT json_value('{"key1":123}', '$.key1');
+--------------------------------------+
| json_value('{"key1":123}', '$.key1') |
+--------------------------------------+
| 123 |
+--------------------------------------+
SELECT json_value('{"key1": [1,2,3], "key1":123}', '$.key1');
+-------------------------------------------------------+
| json_value('{"key1": [1,2,3], "key1":123}', '$.key1') |
+-------------------------------------------------------+
| 123 |
+-------------------------------------------------------+Last updated
Was this helpful?

