Answer the question
In order to leave comments, you need to log in
How to update 1 specific value in json field mysql 5.7?
Mysql 5.7 added support for json fields, there are a lot of functions to work with, but I can't find how to update something in the json itself without overwriting the entire field.
For example, there is a value with this json:
{
"key1" : "value1",
"key2": {
"key1": "valu1"
}
}
Answer the question
In order to leave comments, you need to log in
JSON_REPLACE (`json_value`, '$.key1', 'newValue1', '$.key2.key1', 'newValue2')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question