I have a json field suppose from table T1 and field F1 {"X":[{"a":"1","t":"2"},{"a":"2","t":"4"}]}
If i want to update my t=2 to t=10 for a:1, how to do this?
What will be the normal mysql syntax?
i tried something like this it just update t=10 value separately
UPDATE T1 set F1 = JSON_SET(F1, '{"a":"1","$.t", "10"}') where id = 1;
tried with this..it just add another value to the same field like
{"X":[{"a":"1","t":"2"},{"a":"2","t":"4"}],"t":"10"}
Thanks in advance..