📜  更新 mysql 数据库中的 json 对象 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:04.460000             🧑  作者: Mango

代码示例1
SET @data = '{  
    "Person": {    
       "Name": "Homer", 
       "Hobbies": ["Eating", "Sleeping"]  
    }
 }';
SELECT JSON_SET(@data, '$.Person.Name', 'Bart', '$.Person.Hobbies[1]', "Mischief") AS 'Result';