title: Postgres Increment JSONB Object Property By X
body: <p>I have the following JSONB object in column &quot;charges&quot; of table &quot;Reservation&quot;.</p>
  <pre><code>{&quot;total&quot;: 0, &quot;charges&quot;: [{&quot;foo&quot;: &quot;bar&quot;}]}
  </code></pre>
  <p>What's the SQL statement to increment (update) the value of total by X without modifying rest of the JSONB structure?</p>