How do I modify fields inside the new PostgreSQL JSON datatype?

With postgresql 9.3 I can SELECT specific fields of a JSON data type, but how do you modify them using UPDATE? I can’t find any examples of this in the postgresql documentation, or anywhere online. I have tried the obvious: postgres=# create table test (data json); CREATE TABLE postgres=# insert into test (data) values (‘{“a”:1,”b”:2}’); … Read more