How to implement LIKE on a column data of SharePoint list using REST API?
Is there a way to achieve it?
Current Situation:
The API is working fine but the desired result is not to have the exact match.
Required:
All the names matching ‘John’ should come in response.
var URL = _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/GetByTitle('UserList')/Items?$select=UserName&$filter=UserName eq 'John')";
var response = $.ajax({type: "GET", url: URL, async: false, dataType: "json"}).responseText;
var x = jQuery.parseJSON(response);
console.log(x);
Thanks!
2
Answers
try to log the response to your console and inspect the logged array,
now try to use this filter
For text filed
For User field