title: Combine two JSON objects in PostgreSQL
body: <p>I have two JSON rows in a PostgreSQL 9.4 table:</p>
  <pre><code>      the_column      
  ----------------------
   {&quot;evens&quot;: [2, 4, 6]}
   {&quot;odds&quot;: [1, 3, 5]}
  </code></pre>
  <p>I want to combine all of the rows into one JSON object. (It should work for any number of rows.)</p>
  <p>Desired output:</p>
  <p><code>{&quot;evens&quot;: [2, 4, 6], &quot;odds&quot;: [1, 3, 5]}</code></p>