title: postgresql jsonb - from list of integers to list of Objects
body: <p>I have a question regarding jsonb in postgresql.</p>
  <p>I have a table that has a column of type jsonb, where I store a list of integers.</p>
  <p>For example <strong>list_integers</strong> column:
  <strong>[1, 2, 3, 4]</strong></p>
  <p>I want to add a new column in this table, and insert in this column the same IDs, but the form would be list of objects, where the ID field corresponds to the integer.</p>
  <p>For example <strong>list_ids</strong> column:
  <strong>[{&quot;id&quot;: 1}, {&quot;id&quot;: 2}, {&quot;id&quot;: 3}, {&quot;id&quot;: 4}]</strong></p>
  <p>What would be the best way to do this?</p>