I'm using JavaScript to pull data from a SharePoint 2013 list. The REST request works fine and I can see the data in the debug windows of Chrome. I am struggling to determine how to access specific pieces of the data.
When I open the Chrome tools I can see the object and it looks like this {d:{...}}. I can expand it and look at the data.
What I have not been able to do is access specific elements say for example the Title column information for element 0. I've tried data.results[0].Title and other ways but nothing.
I can write the code to grab what I need just need to understand how to access the data in the code first.
Thanks for the help.
The REST call I'm using is as follows:
var srcListName="MyList";
var oDataUrl="https://somesharepoint.com/_api/web/lista/getbytitle('"+srcListName+"')/items?$;
$.ajax({
url:oDataUrl,
type:"GET",
dataType: "json",
headers:{"accept":"application/json;odata=verbose"},
success:mySuccHandler,
error: myErrHandleer});
function mySuccHandler(data){
console.log(data);
}
function myErrorHandler(data,errMessage){
}