title: Update values in struct arrays in BigQuery
body: <p>I am looking for an easy way to update values inside array of structs using SQL. Let's say we have a table:</p>
  
  <pre><code>CREATE TABLE schema.table
  (
      date DATE,
      weights ARRAY&lt;STRUCT&lt;animal STRING, value FLOAT64&gt;&gt;
  )
  ;
  
  insert into schema.table
  select cast('2020-01-01' as date), [('dog', 10.2), ('bird', 0.7), ('dragon', 3.2)]
  union all
  select cast('2020-01-02' as date), [('dog', 10.3), ('bird', 0.7)]
  union all
  select cast('2020-01-03' as date), [('dragon', 3.3)]
  </code></pre>
  
  <p>So the table looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/bcPeK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bcPeK.png" alt="enter image description here"></a></p>
  
  <p>I would somehow like to update this table and change all <code>dragon</code> names to a <code>cat</code>.</p>