update mysql json_table code example
Example: updating json object in mysql database
SET @data = '{
"Person": {
"Name": "Homer",
"Hobbies": ["Eating", "Sleeping"]
}
}';
SELECT JSON_SET(@data, '$.Person.Name', 'Bart', '$.Person.Hobbies[1]', "Mischief") AS 'Result';