title: Removing null/empty values from an array
body: <p>I'm struggling to understand arrays and structs in BigQuery. When I run this query in Standard SQL:</p>
  
  <pre><code>with t1 as (
    select 1 as id, [1,2] as orders
    union all
    select 2 as id, null as orders
  )
  select
    id,
    orders
  from t1
  order by 1
  </code></pre>
  
  <p>I get this result in json:</p>
  
  <pre><code>[
    {
      "id": "1",
      "orders": [
        "1",
        "2"
      ]
    },
    {
      "id": "2",
      "orders": []
    }
  ]
  </code></pre>
  
  <p>I want to remove to remove the orders value for id = 2 so that I instead get:</p>
  
  <pre><code>[
    {
      "id": "1",
      "orders": [
        "1",
        "2"
      ]
    },
    {
      "id": "2"
    }
  ]
  </code></pre>
  
  <p>How can I do this? Do I need to add another CTE to remove null values, how?</p>