The following table describes the supported JavaScript Object Notation (JSON) functions.
| Function | Description |
|---|---|
JSON_ARRAY |
Creates a JSON array from the specified values. |
JSON_ARRAYAGG |
Aggregates multiple values into a single JSON array. |
JSON_DEPTH |
Returns the depth of a JSON document. |
JSON_EXTRACT |
Extracts data from a JSON document. This function’s alias is the -> operator. |
JSON_INSERT |
Inserts new values into a JSON document at specified paths. |
JSON_KEYS |
Returns an array of keys from a JSON object. |
JSON_LENGTH |
Returns the number of elements or members in a JSON array or object. |
JSON_MERGE_PATCH |
Merges two or more JSON documents using the JSON Merge Patch standard. |
JSON_OBJECT |
Creates a JSON object from key/value pairs. |
JSON_OBJECTAGG |
Aggregates multiple key/value pairs into a single JSON object. |
JSON_PRETTY |
Pretty-prints a JSON document, formatting it in a more human-readable way with indentation and new lines. |
JSON_QUERY |
Extracts a JSON value as JSON text. |
JSON_REMOVE |
Removes specified paths from a JSON document. |
JSON_REPLACE |
Replaces existing values in a JSON document with new values. |
JSON_SEARCH |
Searches for a value in a JSON document and returns the path to the value if found. |
JSON_SET |
Sets or updates values in a JSON document. |
JSON_TABLE |
Projects JSON data into relational rows and columns. |
JSON_VALID |
Validates a JSON document, returning a boolean indicating whether the document is well-formed JSON. |
JSON_VALUE |
Extracts a scalar value from a JSON document. |
For more information, see the MySQL documentation: JSON Function Reference.