I have employee table in postgreSQL
CREATE TABLE Employee(EmployeeID integer PRIMARY KEY AUTO_INCREMENT,
Employeename VARCHAR(100));
alter table Employee add column parents JSON;
Now, I want to update JSON column with JSON array with a value from the existing column like below.
update employee set parents = json_array_elements('[{"name":Employeename, "id":EmployeeID }]')
Any way I can achieve this?