title: Return SQL Server database query with nested Json
body: <p>I am trying to get this kind of answer when I consume my endpoint : </p>
  
  <pre><code>[  
     {  
        "McqID":"7EED5396-9151-4E3D-BCBF-FDB72CDD22B7",
        "Questions":[  
           {  
              "QuestionId":"C8440686-531D-4099-89E9-014CAF9ED054",
              "Question":"human text",
              "Difficulty":3,
              "Answers":[  
                 {  
                    "AnswerId":"7530DCF4-B2D9-48B0-9978-0E4690EA0C34",
                    "Answer":"human text2",
                    "IsTrue":false
                 },
                 {  
                    "AnswerId":"5D16F17F-E205-42A5-873A-1A367924C182",
                    "Answer":"human text3",
                    "IsTrue":false
                 },
                 {  
                    "AnswerId":"64E78326-77C3-4628-B9E3-2E8614D63632",
                    "Answer":"human text4",
                    "IsTrue":false
                 },
                 {  
                    "AnswerId":"199241A9-0EF6-4F96-894A-9256B129CB1F",
                    "Answer":"human text5",
                    "IsTrue":true
                 },
                 {  
                    "AnswerId":"EDCCAC18-5209-4457-95F2-C91666F8A916",
                    "Answer":"human text6",
                    "IsTrue":false
                 }
              ]
           }
        ]
     }
  ]
  </code></pre>
  
  <p>Here's my query (example) : </p>
  
  <pre><code>SELECT 
      Questions.QcmID AS QcmID, 
      (SELECT 
           Questions.id AS QuestionId, 
           Questions.Intitule AS Question, 
           Questions.Difficulte AS Difficulty, 
           (SELECT 
                Reponses.id AS AnswerId, 
                Reponses.Libelle AS Answer, 
                Reponses.IsTrue AS IsTrue
            FROM 
                Reponses
            WHERE 
                Reponses.QuestionID = Questions.id
            FOR JSON PATH) AS Answers
       FROM 
           Questions
       WHERE 
           Questions.QcmID = '7EED5396-9151-4E3D-BCBF-FDB72CDD22B7'
       FOR JSON PATH) AS Questions
  FROM 
      Questions
  WHERE 
      Questions.QcmID = '7EED5396-9151-4E3D-BCBF-FDB72CDD22B7'
  FOR JSON PATH
  </code></pre>
  
  <p>I want a nested JSON representing my data, but it ends up being formatted like (smaller example) : </p>
  
  <pre><code>[  
     {  
        "JSON_F52E2B61-18A1-11d1-B105-00805F49916B":"[{\"QcmID\":\"7EED5396-9151-4E3D-BCBF-FDB72CDD22B7\"}]"
     }
  ]
  </code></pre>
  
  <p>I've tried everything, <code>FOR JSON PATH</code>, <code>FOR JSON AUTO</code>, <code>JSON_QUERY</code>, etc... </p>
  
  <p>Nothing works. <code>FOR JSON PATH</code> doesn't seem to work with multiple nested collections. </p>
  
  <p>How do I get this result ? </p>