title: select query for >= jsonb column value in postgresql
body: <p>I have a postgres database with <code>jsonb</code> format column <code>tags</code>in table.  I am trying to query for rows where the <code>confidence &gt;= 50</code>.</p>
  
  <p>I am unsure how to index into the predictions list to check for the confidence. I have tried the query below it executes without error but doesn't return any rows.</p>
  
  <p><code>select * from mytable where (tags-&gt;&gt;'confidence')::int &gt;= 50;</code></p>
  
  <p>Here is an example row jsonb</p>
  
  <pre><code>{
      "predictions": [
          {
              "label": "Shopping",
              "confidence": 91
          },
          {
              "label": "Entertainment",
              "confidence": 4
          },
          {
              "label": "Events",
              "confidence": 2
          }
      ]
  }
  </code></pre>