Filter Jquery AutoComplete by multiple values of an array of objects
问题 I want to set up autocomplete plugin for selecting only the valid employees in the list. I have an array of Employee objects, having EmployeeID and EmployeeName. Currently I have loaded the autocomplete for the EmployeeName by copying all the Employee's EmployeeName in an array and feeding it to setup the autocomplete plugin. var employeeNames = new Array(); for (var i = 0 ; i < employees.length ; i++) { employeeNames[a] = employees.Employee[a].Name; } $("#txtEmployeeName").autocomplete