Syntax\n------\n\nJSON_SEARCH(json_doc, return_arg, search_str[, escape_char[, path] ...])\n\nDescription\n-----------\n\nReturns the path to the given string within a JSON document, or NULL if any of _json_doc_, _search_str_ or a path argument is NULL; if the search string is not found, or if no path exists within the document.\n\nA warning will occur if the JSON document is not valid, any of the path arguments are not valid, if _return_arg_ is neither _one_ nor _all_, or if the escape character is not a constant. NULL will be returned.\n\n_return_arg_ can be one of two values:\n\n 'one: Terminates after finding the first match, so will return one path string. If there is more than one match, it is undefined which is considered first.\n all: Returns all matching path strings, without duplicates. Multiple strings are autowrapped as an array. The order is undefined.\n\nExamples\n--------\n\nSET @json = '["A", [{"B": "1"}], {"C":"AB"}, {"D":"BC"}]';\n\nSELECT JSON_SEARCH(@json, 'one', 'AB');\n+---------------------------------+\n| JSON_SEARCH(@json, 'one', 'AB') |\n+---------------------------------+\n| "$[2].C"                        |\n+---------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/special-functions/json-functions/json_search