JSON_REPLACE
Replace values in a JSON document. This function replaces existing values in a JSON document and returns the result.
Syntax
JSON_REPLACE(json_doc, path, val[, path, val] ...)Description
Examples
SELECT JSON_REPLACE('{ "A": 1, "B": [2, 3]}', '$.B[1]', 4);
+-----------------------------------------------------+
| JSON_REPLACE('{ "A": 1, "B": [2, 3]}', '$.B[1]', 4) |
+-----------------------------------------------------+
| { "A": 1, "B": [2, 4]} |
+-----------------------------------------------------+See Also
Last updated
Was this helpful?

