1

I have a REST API call in SharePoint and everything is working as expected, however the output returned by call is array of array if more then 100 records are fetched (attached image):

Output from rest api call

I am not sure how to handle it, means result can be less then 100 or more then 100. Need some advice here.

1 Answer 1

0

Simply add below code in success function of REST API call:

$.ajax({
   ...
   success: function(data) {
      if(data && data.d.results) {
          for(var i=0; i < data.d.results.length; i++) {
             console.log(data.d.results[i].Id);
          } 
      } 
   },
   error: function (error) {
      failure(error);
   } 
});
1
  • Hi @Vijay, have you tried this? is it working for you? let me know if you have any issue while using this. May 19, 2020 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.