title: How to nest a json column in another one in bigquery
body: <p>I have a string column in bigquery with json format, let's call it <code>child_col</code> and as en example it has the value <code>'{&quot;code&quot;: &quot;foo&quot;}'</code>.
  I'm trying to create another string column, e.g. <code>parent_col</code>, with a json value that has the json in <code>child_cold</code> as a nested property, e.g.</p>
  <pre><code>'{
    &quot;code&quot;: &quot;parent&quot;,
    &quot;child&quot;: {&quot;code&quot;: &quot;foo&quot;}
  }'
  </code></pre>
  <p>I am doing it by using <code>TO_JSON_STRING</code> in Bigquery:</p>
  <pre><code>parent_col = TO_JSON_STRING(STRUCT('parent' AS code, child_col AS child))
  </code></pre>
  <p>This almost works but looks at <code>child_col</code> as a plain string and the result looks like this:</p>
  <pre><code>'{
    &quot;code&quot;: &quot;parent&quot;,
    &quot;child&quot;: &quot;{\&quot;code\&quot;: \&quot;foo\&quot;}&quot;
  }'
  </code></pre>
  <p>I've tried nesting the <code>child_col</code> in <code>TO_JSON_STRING(STRUCT('parent' AS code, child_col AS child))</code> in <code>JSON_VALUE()</code>, <code>JSON_QUERY(child_col, '$')</code>, <code>JSON_EXTRACT(child_col, '$')</code>, the first one gives a json <code>null</code> always and the latter two are still escaping things. e.g.</p>
  <pre><code>parent_col = TO_JSON_STRING(STRUCT('parent' AS code, JSON_QUERY(child_col, '$') AS child))
  </code></pre>
  <p>What's an easy way to do this?</p>