When I create a web service that returns JSON and I use the example from the help file:
SELECT top 3
emp.EmployeeID,
so.CustomerID,
so.Region
FROM Employees AS emp KEY JOIN SalesOrders AS so WHERE emp.EmployeeID <= 195
ORDER BY 1
FOR JSON AUTO;
The webservice returns:
"forjson(512,'emp',forxml_sep(),'EmployeeID',jsontab."1",'so',forxml_sep(),'CustomerID',jsontab."2",'Region',jsontab."3")": "[{"emp":{"EmployeeID":129,"so":[{"CustomerID":107,"Region":"Eastern"},{"CustomerID":119,"Region":"Western"},{"CustomerID":131,"Region":"Eastern"}]}}]"
How can I get rid of the header "forjson...." and how can I get rid of the " around the data section?
TIA
Frank