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