In MySQL, the JSON_REPLACE()
function replaces values in a JSON document and returns the result.
You provide the JSON document as the first argument, followed by the path to replace data at, followed with the value to replace the existing value with.
You can replace data at multiple places in the document if required. To do this, simply provide multiple path/value pairs as required.