title: SQL Server JSON_VALUE syntax
body: <p>I created a SQL Server Table with 25 columns.  One of my columns is actually JSON text, stored as nvarchar(max).</p>
  <p>Now I need to able to query this JSON column and parse out the various attributes.  I have tried applying JSON_VALUE to my column but am doing something wrong; my query runs but returns NULL for all the values.</p>
  <p>The JSON itself looks like:</p>
  <pre><code>[
   {
    &quot;lineName&quot;:&quot;GHjr&quot;,
    &quot;pipeDiameter&quot;:&quot;12&quot;,
    &quot;pipeLength&quot;:&quot;52000&quot;,
    &quot;pressure&quot;:&quot;15&quot;,
    &quot;volume&quot;:&quot;107&quot;
   },
   {
    &quot;lineName&quot;:&quot;Ks3R&quot;,
    &quot;pipeDiameter&quot;:&quot;9&quot;,
    &quot;pipeLength&quot;:&quot;40000&quot;,
    &quot;pressure&quot;:&quot;15&quot;,
    &quot;volume&quot;:&quot;80&quot;
   }
  ]
  </code></pre>
  <p>The SQL I am using is:</p>
  <pre><code>select
   DOC_ID, LINE_SPECS,
   JSON_VALUE(LINE_SPECS, '$.lineName')     as line_name,
   JSON_VALUE(LINE_SPECS, '$.pipe_Diameter') as diameter
  from dbo.MY_TEST_DOCS
  where ISJSON(LINE_SPECS) &gt; 0
    and len(LINE_SPECS) &gt; 3
  </code></pre>
  <p>However, my 2 &quot;parsed&quot; columns are returning all NULL.  How do I parse the five attributes from this column?</p>