Input table data (People table)
IdNameAge1John232Jane31
Query
SELECT Id, Name, Age
FROM People
FOR JSON PATH
Result
[
{"Id":1,"Name":"John","Age":23},
{"Id":2,"Name":"Jane","Age":31}
]