title: Update json value from sql column value
body: <p>Using SQL Server, I want to take column data and copy it into a json object column</p>
  <p>I am using SQL Server to a query a column and a json data. What I want to do is to copy the data in column <code>ename</code> to <code>fieldvalue</code> column in the code below. If I could do it using SQL that would be great.</p>
  <pre><code>SELECT 
      a.id, a.ssn, a.ename, p.CaptionName, p.FieldName, p.FieldType, p.FieldValue
  FROM 
      tablename as a
  CROSS APPLY 
      OPENJSON (details)
          WITH (CaptionName NVARCHAR(100),
                FieldName NVARCHAR(100),
                FieldType NVARCHAR(15),
                FieldValue NVARCHAR(50)) AS P
  WHERE
      p.captionname = 'txtEname' 
      AND a.ssn = '000-00-0000'
  </code></pre>
  <p>My json string in the details column</p>
  <pre><code>[{&quot;CaptionName&quot;:&quot;txtEname&quot;,&quot;FieldName&quot;:null,&quot;FieldType&quot;:null,&quot;FieldValue&quot;:&quot;&quot;}]
  </code></pre>
  <p>I'm really not that good with sql which is what i want to use. after copying the data to the json object i will remove the ename column.</p>