Guest User

Untitled

a guest
Jan 17th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. jQuery(document).ready(function() {
  2.  
  3. jQuery.ajax({
  4. url: "https://test.sharepoint.com/sites/test/Negocio/_api/web/folders('Historico')/folders?$select=ID,Title,Created,Name",
  5. type: "GET",
  6. headers: {
  7. "accept": "application/json;odata=verbose",
  8. "content-type": "application/json;odata=verbose",
  9. },
  10.  
  11. success: onQuerySucceeded,
  12. error: onQueryFailed
  13. });
  14.  
  15.  
  16. });
  17.  
  18. function onQuerySucceeded(data)
  19. {
  20. console.log(data.d.results);
  21. var dataresult = data.d.results;
  22. dataresult = [].slice.call(dataresult);
  23. dataresult.forEach(function(key, value){
  24.  
  25. console.log(value.Name);
  26.  
  27. });
  28. }
  29.  
  30. function onQueryFailed() {
  31. alert('Sorry An Error Has Occurred!');
  32. }
Add Comment
Please, Sign In to add comment