title: Postgres jsonb_set multiple nested fields
body: <p>I have DB table with a jsonb column that has an entity, with nested child entities. Let's say we have:</p>
  
  <p><code>SELECT jsonb_set('{"top": {"nested": {"leaf" : 1}}}', '{top,nested,leaf}', '2');</code></p>
  
  <p>Which work's fine by updating <code>top.nested.leaf</code> to 2.</p>
  
  <p>But what if we wanted to do multiple fields, such as:</p>
  
  <p><code>SELECT jsonb_set('{"top": {"nested": {"leaf" : 1}, "other_nested": {"paper": 0}}}', '[{top,nested,leaf}, {top,other_nested,paper}]', '[2, 2]');</code></p>
  
  <p>The above does not work and says:</p>
  
  <p><code>ERROR:  malformed array literal: "[{top,nested,leaf}, {top,other_nested,paper}]"
  LINE 1: ...": {"leaf" : 1}, "other_nested": {"paper": 0}}}', '[{top,nes...
                                                               ^
  DETAIL:  "[" must introduce explicitly-specified array dimensions.</code></p>
  
  <p>Any ideas?</p>