I have a problem with populating an autocomplete list based on a previous input.
Basically, I have about 40 or so different arrays containing car models and I want to populate the autocomplete list based on the previous input. What I want to do is:
- Get the value of the previous input (the name of this is the same name as one of the arrays)
- Select the correct array based on this input.
- Pass this array into the autocomplete function.
The problem is that I don't know how to select an array based on a string. Can anyone suggest a solution?
Thanks.