title: Storing JSON in BigQuery
body: <p>I have various highly nested json objects. I am wondering whether to store these as <code>STRUCT</code>s in BigQuery or as a <code>STRING</code>. If storing it as a string, then I can use <code>JSON_EXTRACT</code> where necessary to get what I need. I have a few questions on using the following approach:</p>
  
  <ul>
  <li>Would it be a bad idea storing json data as a string instead of record?</li>
  <li>Would there be a big performance hit whenever using that json field if it's stored as a string?</li>
  <li>What additional advantages would storing the json as a <code>STRUCT</code> instead of a string give?</li>
  </ul>
  
  <p>Finally, I wasn't able to find any place in the documentation that gives examples of how to query <code>STRUCT</code>s. The only place I could find was <a href="https://cloud.google.com/bigquery/docs/nested-repeated" rel="noreferrer">https://cloud.google.com/bigquery/docs/nested-repeated</a>. Are there examples in the documentation (or elsewhere) on querying nested fields? Additionally, why is the term <code>RECORD</code> and <code>STRUCT</code> used interchangeably on this page?</p>
  
  <p>Note that the json will not be repeated at the root level, i.e., it will look like <code>{...}</code> and not <code>[{...},{...}]</code>.</p>
  
  <p>As a reference, in Redshift you would (as of this question) store json as a string and use the json-functions to manipulate it: <a href="https://stackoverflow.com/a/32731374/651174">https://stackoverflow.com/a/32731374/651174</a>.</p>