title: How To Query an array of JSONB
body: <p>I have table (orders) with <code>jsonb[]</code> column named <code>steps</code> in Postgres db.</p>
  <p>I need create SQL query to select records where Step1 and Step2 and Step3 has <em>success status</em></p>
  <pre><code>[
   {
    &quot;step_name&quot;=&gt;&quot;Step1&quot;,
    &quot;status&quot;=&gt;&quot;success&quot;,
    &quot;timestamp&quot;=&gt;1636120240
    },
   {
    &quot;step_name&quot;=&gt;&quot;Step2&quot;,
    &quot;status&quot;=&gt;&quot;success&quot;,
    &quot;timestamp&quot;=&gt;1636120275
   },
   {
    &quot;step_name&quot;=&gt;&quot;Step3&quot;,
    &quot;status&quot;=&gt;&quot;success&quot;,
    &quot;timestamp&quot;=&gt;1636120279
   },
   {
    &quot;step_name&quot;=&gt;&quot;Step4&quot;, 
    &quot;timestamp&quot;=&gt;1636120236
    &quot;status&quot;=&gt;&quot;success&quot;
    }
  ]
  </code></pre>
  <p>table structure
  id | name | steps (jsonb)</p>