title: SQL Recursive evaluation for each record from separate table (parseJSON)
body: <p>I'm trying to evaluate a JSON response in SQL for each of the records and merge these into one table.</p>
  
  <p>I'm currently using <a href="https://www.red-gate.com/simple-talk/sql/t-sql-programming/consuming-json-strings-in-sql-server/" rel="nofollow noreferrer">consuming-json-strings-in-sql-server/</a> to parse the json which returns a table-valued function, 
  e.g.</p>
  
  <pre><code>select *
  from parseJSON('{"a":1}'); 
  </code></pre>
  
  <p>which gives </p>
  
  <pre>element_id sequenceNo  parent_ID   Object_ID   NAME    StringValue ValueType
      1           0           1       NULL        a                       int
      2           1           NULL    1           -                       object</pre>
  
  <p>This needs to recurse on each record and merge for each JSON string stored in another table. I'm sure I'm overthinking this again and hoping something simple is around the corner...</p>
  
  <p>As always, any help is greatly appreciated!</p>