title: Read any JSON into list of key-value pairs (EAV format) in SQL Server
body: <p>Looking for a way to read any JSON without knowing the internals with SQL Server's JSON methods, I came up with an approach I'd like to share.</p>
  
  <p><a href="https://stackoverflow.com/q/60955104/5089204">Here</a> is the question bringing up this issue.</p>
  
  <p>The question is: How can I transform an unknown JSON into a structured EAV format while keeping all the information about sort order and nest levels.</p>
  
  <p>The ideal output should carry the original row's id as the <em>entity</em>, the Json's key and value as the <em>attribute</em> and <em>value</em> together with the JsonPath for the specific object in a sorted list.</p>
  
  <p>Find the MCVE (sample data from the linked question) embedded into my self-answer.</p>