Update postgres json value by other attribute
The concatenation operator || will do that:
update the_table
  set data = data || jsonb_build_object('new-attr', data -&gt; 'my-value')
where data ? 'my-value'; --&lt;&lt; only update rows that contain the key

The ? operator tests if the key is present in the JSON value.

If your column is defined as json (rather than jsonb which it should be), you probably need to cast it, to make the || operator work properly: data::jsonb || ...