I'm unable to implement the filter functionality for a people picker field in data table. Is there any way to implement this filter against a people picker field in data table?? Below is the code which I'm trying to implement filter.
<td>
<span id="CentralECG2">
<div dir="">
<div id="CentralECG2_TopSpan" title="Enter a name or emailId" spclientpeoplepicker="true"></div>
</div>
</span>
</td>
if(peopleFilter != "") {
var requestUrl = absoluteUrl + "/_api/web/siteusers?$filter=Email eq '"+ peopleFilter +"'";
var userData = getDatafromList(requestUrl)[0];
peopleFilter = formatname(userData.Title);
if(TableFilter == true) {
$('#filterBy').text(peopleFilter);
table.column(20).search(peopleFilter, false, true).draw(); //this search is not working since the field is people picker, but when I change to free text it's working.
}
}