title: Update/Delete JSON array value in SQL Server
body: <p>I have a json array in my table. It contains an array. I can <code>create</code>, <code>append</code> or make my array <code>NULL</code>. Inside my stored procedure but I don't see any way to <code>pop</code> value from array. Apparently <code>JSON_Modify</code> may have solution as you can update <code>key</code> as well as <strong>Single</strong> <code>value</code> but how can I use it to modify my array?</p>
  
  <pre><code>--My Array 
  Declare @json = '{"array":[123,456]}'
  </code></pre>
  
  <p>Desired results after update:</p>
  
  <pre><code>'{"array":[123]}'
  </code></pre>
  
  <p>Please note that <code>array</code> contain <code>int</code> values. Which are my <code>sub department id</code>. All values are (supposed to be) unique.</p>