JSON_EXISTS()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Checks if the value at the specified path exists in the specified JSON document.
Returns 1
if the path is found and 0
if it is not.
USAGE
JSON_EXISTS(<json_doc>, <path>)
EXAMPLES
SELECT JSON_EXISTS('{"a":"A", "b":"B", "c":[20, 30, 40]}', "$.c") AS result;
+--------+
| result |
+--------+
| 1 |
+--------+
SELECT JSON_EXISTS('{"a":"A", "b":"B", "c":[20, 30, 40]}', "$.d") AS result;
+--------+
| result |
+--------+
| 0 |
+--------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.