2016-10-10

In the Javascript below, we illustrate how to create a REST query that will return all of the List Items in a particular list and also filter the results.

//lists/getByTitle('MyList')/items?$select= Title&$expand=Author"
//example of the syntax of the filter
var query = "LinkTitle eq '0001'";
return $.ajax({
url: "https://mySite/_api/web/lists/getbytitle('MyList')/items" + query,
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
async:false,
complete: function (data, err) { 
console.log(err);
}
});
the output can be managed in this way:
data = Metodo
result = data.d.results;

 

About the author 

Gerardo Nacchia