title: parsing JSON column in SQL Server
body: <p>I have a JSON string stored in a SQL Server table column.  The column is named MSSG_RECIPS and contains one long text string like:</p>
  
  <pre><code>`{"type":"email","recipient":"\"Artzer, Daniel J\" &lt;DJArtzer@emailaddr.com&gt;","sentTS":"2017-11-08T20:58:14.600Z"},{"type":"email","recipient":"\"Friedman, Brian\" &lt;BFriedman@emailaddr.com&gt;","sentTS":"2017-11-08T20:58:14.600Z"},{"type":"email","recipient":"\"Higgins, Laura L\" &lt;LLHiggins@emailaddr.com&gt;","sentTS":"2017-11-08T20:58:14.600Z"},{"type":"email","recipient":"\"Landenberger, Dan R\" &lt;DRLandenberger@emailaddr.com&gt;","sentTS":"2017-11-08T20:58:14.600Z"},{"type":"email","recipient":"\"Leitl, Scott\" &lt;SLeitl@emailaddr.com&gt;","sentTS":"2017-11-08T20:58:14.600Z"},{"type":"email","recipient":"\"Mendoza, Mario\" &lt;MMendoza@emailaddr.com&gt;","sentTS":"2017-11-08T20:58:14.600Z"}`
  </code></pre>
  
  <p>This sample string illustrates the format of my JSON, each element being comma-separated.</p>
  
  <p>I am able to parse this 2 ways.  One, using JSON_VALUE, I can retrieve the attributes as individual columns:</p>
  
  <pre><code>select
   JSON_VALUE(mssg_recips, '$.type'),
   JSON_VALUE(mssg_recips, '$.recipient'),
   JSON_VALUE(mssg_recips, '$.sentTS'),
   DOC_ID
  from MY_JSON_TAB
  </code></pre>
  
  <p>However, this only returns the 1st element of the JSON.</p>
  
  <p>The other method I tried is:</p>
  
  <pre><code>select doc_id, value as EMAIL_RECIP
  from MY_JSON_TAB
  Cross Apply OPENJSON(MSSG_RECIPS)
  </code></pre>
  
  <p>This returned the record as rows instead of columns but, again, only the 1st element.</p>
  
  <p>How do I traverse downward, so to speak, to retrieve the 2nd, 3rd, and so on elements?  </p>