title: PostgreSQL JSON building an array without null values
body: <p>The following query</p>
  
  <pre><code>SELECT jsonb_build_array(jsonb_build_object('use', 'Home'), 
          CASE WHEN 1 = 2 THEN jsonb_build_object('use', 'Work')
          END)
  </code></pre>
  
  <p>produces </p>
  
  <pre><code>[{"use":"Home"},null]
  </code></pre>
  
  <p>When I actually want </p>
  
  <pre><code>[{"use":"Home"}]
  </code></pre>
  
  <p>How do I go about doing this? <code>json_strip_nulls()</code> does not work for me.</p>