I'm using autocomplete and have some local data that looks like var locations = [ { name: "ABB Bomem CAN", locationkey: "10049" }, { name: "ANL", locationkey: "9999" }, { name: "Applied Sys Eng", locationkey: "10028" }, { name: "BNL", locationkey: "10053" }, { name: "Campbell AUS", locationkey: "10012" }, { name: "Campbell UTAH", locationkey: "10015" }, ... ];
This array is structures similar to the local data used in the autocomplete 'email' example. The problem I have is with how the plugin matches this data. I want the matches restricted to the names only and not the locationkeys. For example if someone types "100" all the locations with keys contain 100 show up as matches. That isn't desirable. Is this possible or do I need to have two local arrays: one with the names only and another that can be used to lookup the keys? I'll use the keys to make an AJAX call to get all the data for a chosen location. Thanks