title: PostgreSQL returning JSON array containing null value
body: <p>I have the following query on PostgreSQL, I have the vacations columns that I display an array of objects, but some columns don't have values and will return null values, but the problem is, it will always return a array that looks like <code>[NULL]</code>, Is it possible to return only an empty <code>[]</code>?</p>
  <pre><code>SELECT 
      u.&quot;name&quot;,
      u.email,
      to_json(array_agg(row_to_json(uv))) as vacations
  from public.&quot;user&quot; as u 
  join user_address ua on ua.user_id = u.id 
  left join user_vacation uv on uv.address_id = ua.id 
  where u.place is not null 
  group by 
      u.&quot;name&quot;,
      u.email;
  </code></pre>
  <p>Result:</p>
  <pre class="lang-none prettyprint-override"><code>name       | email            | vacations
  some_name  | some@email.com   | [{&quot;id&quot;: 1, &quot;area&quot;: &quot;description&quot;}]
  some_name  | some@email.com   | [{&quot;id&quot;: 1, &quot;area&quot;: &quot;description&quot;}]
  some_name  | some@email.com   | [null]
  some_name  | some@email.com   | [null]
  </code></pre>