I have a column in DB of type json. The default value of it is [].
Im trying to append a json object to it, and every time it gets updated it will be appended with another json object.
data coming in
{"name":"foo", "timestamp": 123}
new value in DB should be:
[{"name":"foo", "timestamp": 123}]
another Update to row:
{"name":"john", "timestamp": 234}
updated value in row should now be:
[{"name":"foo", "timestamp": 123},{"name":"john", "timestamp": 234}]
I tried:
NEW."dryWeight" = OLD."dryWeight" || NEW."dryWeight";