Querying Postgres 9.3 by json field is really great. However i couldn\'t find a formal way to update the json object, for which i use an internal function written in plp
Solved
The problem with the above plpythonu function is that it relates to "value" as a string no matter if it's actually a complex json object. The key to solve it is to add eval() around value:
js[key] = eval(value)
That way the json string (named 'value' in this example) looses it's outer enclosing double quotes "{...}" and become an object.