in this table - mytable i have a json column - col and its content
[{"id": 1, "data1": "abc", "data2": "xyz"}, {"id": 2, "data1": "def", "data2": "ghi"}]
there is an another table - product
+----+---------+
| id | name |
+----+---------+
| 1 | pro 1 |
+----+---------+
| 2 | pro 2 |
+----+---------+
is there a way that I can append name to each JSON Object in the JSON Array
Ex- [{"id": 1,"name":"pro 1", "data1": "abc", "data2": "xyz"}, {"id": 2,"name":"pro 2", "data1": "def", "data2": "ghi"}]
select version();show? And do you want to modify what's in mytable.col or just select with name added?