title: How to filter jsonb array elements
body: <p>I have a table with a jsonb column which contains an array of objects:</p>
  
  <pre><code>create table my_table(
      id int primary key, 
      phones jsonb);
  </code></pre>
  
  <p>The objects consist of phone numbers and statuses. </p>
  
  <pre><code>insert into my_table values
  (1, 
  '[
      {
          "phone": "929908338",
          "status": "active"
      },
      {
          "phone": "927007729",
          "status": "inactive"
      },
      {
          "phone": "927220419",
          "status": "inactive"
      },
      {
          "phone": "928200028",
          "status": "inactive"
      },
      {
          "phone": "927183322",
          "status": "inactive"
      },
      {
          "phone": "928424554",
          "status": "active"
      },
      {
          "phone": "927779383",
          "status": "inactive"
      }
  ]');
  </code></pre>
  
  <p>I want to get all phones with active status in a single row. Expected output:</p>
  
  <pre><code>["929908338","928424554"]
  </code></pre>