Syntax\n------\n\nJSON_REPLACE(json_doc, path, val[, path, val] ...)\n\nDescription\n-----------\n\nReplaces existing values in a JSON document, returning the result, or NULL if any of the arguments are NULL.\n\nAn error will occur if the JSON document is invalid, the path is invalid or if the path contains a  or * wildcard.\n\nPaths and values are evaluated from left to right, with the result from the earlier evaluation being used as the value for the next.\n\nJSON_REPLACE can only update data, while JSON_INSERT can only insert. JSON_SET can update or insert data.\n\nExamples\n--------\n\nSELECT JSON_REPLACE('{ "A": 1, "B": [2, 3]}', '$.B[1]', 4);\n+-----------------------------------------------------+\n| JSON_REPLACE('{ "A": 1, "B": [2, 3]}', '$.B[1]', 4) |\n+-----------------------------------------------------+\n| { "A": 1, "B": [2, 4]}                              |\n+-----------------------------------------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/special-functions/json-functions/json_replace