I am testing a SharePoint hosted app Menu Action.
I have written a REST call that brings back all the properties in a document item.
I get a valid response but when I unpick my response I run into difficulties
var results = jsonObject.d; // **note jsonObject.d.result is undefined**
Why is this? do I need add anything to my http header or url
This has a knock on effect in that for each below as 'e' is also undefined. I want my code to be robust an reusable - is there anything I need to do?
$.each(results, function (i, e) {
// ul.append("<li>" + e.Title + "</li>");
itemHTML += "<li>" + e.Name + "</li>";
console.log(e.Name);
});

0 commentaires:
Enregistrer un commentaire