Hello I work on JSON in MySQL. I bumped into trouble...
for example, I have data as below
{
1:{fan:0},
2:{fan:3},
3:{fan:4},
}
And I wish update every fan value to 6 : How to do this in MySQL statement?
My below statement gives "in this situation path expressions may not contain the * and ** tokens"
UPDATE mytable set json = JSON_REPLACE(json,'$.*."Fan"', 6);
Is there any simple way to achieve this ?