I know the names of some columns - FirstName, LastName, JobTitle, SAMAccountName, Department
that an API serves out but I would like to know all the columns that are returned.
How do I find out the titles of all the columns?
The commented out line works.
$.ajax ({
//url: 'http://webservice/view/odata/PeopleDepartmentOData?$select=FirstName,LastName,JobTitle,SAMAccountName,Department',
url: 'http://webservice/view/odata/PeopleDepartmentOData',
dataType: 'json',
async: false,
headers: { "Accept": "application/json;odata=verbose" },
success: function(data) {
var html = '';
var count = 1;
var staffToShow = [];
for(var result in data.d.results) {
console.log (data.d.results[result].FirstName + " - " + data.d.results[result].LastName);
console.log (data.d.results[result].Department);