title: OpenJson - nested select?
body: <p>I need to import json data into an SQL table however there are some fields that I only want the numeric value from the list. Is there way to do a nested select using openjson?</p>
  <p>I'm calling a stored procedure on a Microsoft SQL 2016 server from pyton and passing the json as a parameter.</p>
  <pre><code>Select * from OpenJson(@json)
     WITH (id int 'strict $.id',
     [Name] nvarchar(50) '$.name',
     term_id nvarchar(max) as json,
     phone nvarchar(20) '$.phone',
     email nvarchar(50) '$.email',
     street nvarchar(75) '$.street',
     street2 nvarchar(75) '$.street2',
     city nvarchar(50) '$.city',
     zip  nvarchar(20),
     country_id nvarchar(max) as JSON)
  </code></pre>
  <p>The table has the following fields</p>
  <p>ID, Name, Term_ID, Phone, Email, Street, Street2, Zip, City, Country_ID</p>
  <p>see the json below. On the fields term_id and country_id I only want to pull the numeric value not the string.</p>
  <pre><code>[{
      &quot;id&quot;: 340,
      &quot;name&quot;: Joe,
      &quot;term_id&quot;: [
          3,
          &quot;Net 30&quot;
      ],
      &quot;phone&quot;: 123-456-7890,
      &quot;email&quot;: false,
      &quot;street&quot;: &quot;Some Street&quot;,
      &quot;street2&quot;: false,
      &quot;zip&quot;: &quot;01234&quot;,
      &quot;city&quot;: &quot;SomeCity&quot;,
      &quot;country_id&quot;: [
          1,
          &quot;United States&quot;
      ]
  }]
  </code></pre>