title: SQL FOR JSON: Create line for each object
body: <p>I'm currently working on a JSON creation on a SQL Server 2016. For this, I use the FOR JSON function.</p>
  <pre><code>SELECT TOP 2       
        '12.00'            AS [time]
        ,GUID              AS [ID]
        ,'action value'    AS [EVENT.ACTION]
        ,'category value'  AS [EVENT.CATEGORY]
        ,'username'        AS [user.name]  
    FROM TABLE_NAME
   FOR JSON PATH, WITHOUT_ARRAY_WRAPPER
  </code></pre>
  <p>This piece of code creates me this:</p>
  <pre><code>{&quot;time&quot;:&quot;12.00&quot;,&quot;ID&quot;:&quot;16AE8C15-084C-4C84-8F5D-0000193F8E74&quot;,&quot;EVENT&quot;:{&quot;ACTION&quot;:&quot;action value&quot;,&quot;CATEGORY&quot;:&quot;category value&quot;},&quot;user&quot;:{&quot;name&quot;:&quot;username&quot;}},{&quot;time&quot;:&quot;12.00&quot;,&quot;ID&quot;:&quot;D5667AF4-5922-4D30-9C8A-00001AB928F6&quot;,&quot;EVENT&quot;:{&quot;ACTION&quot;:&quot;action value&quot;,&quot;CATEGORY&quot;:&quot;category value&quot;},&quot;user&quot;:{&quot;name&quot;:&quot;username&quot;}}
  
  </code></pre>
  <p>The problem is, every object gets displayed on line 1, but I would like to have one line per object.
  This would look like this:</p>
  <pre><code>{&quot;time&quot;:&quot;12.00&quot;,&quot;ID&quot;:&quot;16AE8C15-084C-4C84-8F5D-0000193F8E74&quot;,&quot;EVENT&quot;:{&quot;ACTION&quot;:&quot;action value&quot;,&quot;CATEGORY&quot;:&quot;category value&quot;},&quot;user&quot;:{&quot;name&quot;:&quot;username&quot;}},
  {&quot;time&quot;:&quot;12.00&quot;,&quot;ID&quot;:&quot;D5667AF4-5922-4D30-9C8A-00001AB928F6&quot;,&quot;EVENT&quot;:{&quot;ACTION&quot;:&quot;action value&quot;,&quot;CATEGORY&quot;:&quot;category value&quot;},&quot;user&quot;:{&quot;name&quot;:&quot;username&quot;}}
  </code></pre>
  <p>I have not found any snippets to do this. How can I create such a</p>