Hello everyone and thanks for your help in advance. I am develop a search box that utilizes the jQuery Autocomplete widget. I am trying to get the widget to consume a JSON data source, however, the data source returns multiple name:value pairs that look like:
I know how to get a singular column bound to the search,
$.ajax({
//url: '/api/values',
//url: 'PatientSearch.aspx',
url: searchUrl + request.term,
type: 'GET',
cache: false,
data: request,
dataType: 'json',
success: function (json) {
response($.map(json, function (item) {
return {
value: item.value, id: item.label
}
}))
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
console.log('error', textStatus, errorThrown);
},
});
But don't know how to bind the returned search to the desired column (in this case claimNo). Additionally, I would like the drop down display to have the claimNo, PatientLastName, and PatientFirstName. I suppose I could write a specific set of return data for this, but this particular search is used in several other areas and it would be nice to reuse code. Any help would be appreciated.