title: jsonb[] vs jsonb where json is an array
body: <p>I have a Postgres table, <code>mytable</code> where one of the field is as follows:</p>
  
  <p><code>myField  JSONB[] NOT NULL</code></p>
  
  <p>and let's assume the said jsons are of this form:</p>
  
  <p><code>{ "letter":"A", "digit":30}</code></p>
  
  <p>What queries should I use to:</p>
  
  <ul>
  <li>extract an array of the <code>digit</code> values?</li>
  <li>extract a json array containing the <code>digit</code> values?</li>
  <li>extract an array of the <code>digit</code> values where <code>digit &gt; 20</code>?</li>
  <li>extract a json array of the <code>digit</code> values where <code>digit &gt; 20</code>?</li>
  </ul>
  
  <p>How would the above queries change if I stored the data as json where the json was a list? </p>
  
  <ul>
  <li>Can I still make all the above queries? </li>
  <li>What would be the performance difference? </li>
  <li>When should I choose one over the other?</li>
  </ul>