0

I have a status field choice with multiple values. How can i get /retrieve these values via rest api

tried :

for (var i = 0; i < data.d.results.length; i++) {
alert(data.d.results[i].Status);
}

I have attached the data im getting from rest.How to get into the collection?

Thanks in Advance

enter image description here

3
  • Have you tried data.d.results[i].Status[0]? Commented Nov 28, 2014 at 0:46
  • just got and was about to post it. Thanks alot. Is the anywhere online with a proper documentation with sharepoint 2013 rest api?
    – naijacoder
    Commented Nov 28, 2014 at 1:35
  • You can check Odata/JSON Parsing. That is the standard. Commented Nov 28, 2014 at 2:22

1 Answer 1

1

You can loop using

    $.each(data.d.results, function (index, task) {
        for(i = 0; i < task.Status.length; i++)
            alert(task.Status[i]);
    });

Your Answer

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

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