JSON_SEARCH
Search for a value in a JSON document. This function returns the path to the given string within a JSON document.
Syntax
JSON_SEARCH(json_doc, return_arg, search_str[, escape_char[, path] ...])Description
Examples
SET @json = '["A", [{"B": "1"}], {"C":"AB"}, {"D":"BC"}]';
SELECT JSON_SEARCH(@json, 'one', 'AB');
+---------------------------------+
| JSON_SEARCH(@json, 'one', 'AB') |
+---------------------------------+
| "$[2].C" |
+---------------------------------+Last updated
Was this helpful?

