does anyone knows how do i insert a new worker ins...
# javascript
j
does anyone knows how do i insert a new worker inside the worker column?
s
Can you elaborate on what you have tried and what is not working?
j
how to insert an object in an array because the worker's column is on json[]
s
It still isn't very clear what you are asking since from your screenshot it seems you have done it before? do you mean how to add additional objects to the existing array?
m
If you want to do what @User mentioned (adding a worker to an array column) then you have to use array_append https://www.postgresql.org/docs/9.1/arrays.html
UPDATE your_table SET workers = array_append(workers, "value") WHERE x = y
There is also || function