Functions That Search JSON Values +-----------------------------------+ | 0 | +-----------------------------------+ 1 row in set (0.00 sec) mysql>  SELECT JSON_OVERLAPS(’[4,5,6,7]’, ’"6"’); +-----------------------------------+ | JSON_OVERLAPS(’[4,5,6,7]’, ’"6"’) | +-----------------------------------+ | 0 | +-----------------------------------+ 1 row in set (0.00 sec) JSON_OVERLAPS()  was added in MySQL 8.0.17. Returns the path to the given string within a JSON document. Returns  NULL  if any of the  json_doc , search_str , or  path  arguments are  NULL ; no  path  exists within the document; or  search_str  is not found. An error occurs if the  json_doc  argument is not a valid JSON document, any  path  argument is not a valid path expression,  one_or_all  is not  ’one’  or  ’all’ , or  escape_char  is not a constant expression. • JSON_SEARCH( json_doc ,  one_or_all ,  search_str [,  escape_char [,  path ] ...]) • ’one’ : The search terminates after the first match and returns one path string. It is undefined which match is considered first. • ’all’ : The search returns all matching path strings such that no duplicate paths are included. If there are multiple strings, they are autowrapped as an array. The order of the array elements is undefined. The  one_or_all  argument affects the search as follows: Within the  search_str  search string argument, the  %  and  _  characters work as for the  LIKE  operator: %  matches any number of characters (including zero characters), and  _  matches exactly one character. To specify a literal  %  or  _  character in the search string, precede it by the escape character. The default is  \  if the  escape_char  argument is missing or  NULL . Otherwise,  escape_char  must be a constant that is empty or one character. For more information about matching and escape character behavior, see the description of  LIKE in Section 12.8.1, “String Comparison Functions and Operators” . For escape character handling, a difference from the  LIKE  behavior is that the escape character for  JSON_SEARCH()  must evaluate to a constant at compile time, not just at execution time. For example, if  JSON_SEARCH()  is used in a prepared statement and the  escape_char  argument is supplied using a  ?  parameter, the parameter value might be constant at execution time, but is not at compile time. search_str  and  path  are always interpeted as utf8mb4 strings, regardless of their actual encoding. This is a known issue which is fixed in MySQL 8.0.24 ( Bug #32449181). mysql>  SET @j = ’["abc", [{"k": "10"}, "def"], {"x":"abc"}, {"y":"bcd"}]’; mysql>  SELECT JSON_SEARCH(@j, ’one’, ’abc’); +-------------------------------+ | JSON_SEARCH(@j, ’one’, ’abc’) | +-------------------------------+ | "$[0]" | +-------------------------------+ mysql>  SELECT JSON_SEARCH(@j, ’all’, ’abc’); +-------------------------------+ | JSON_SEARCH(@j, ’all’, ’abc’) | +-------------------------------+ 2356