Typeahead works if I give a static array as the source, but when I try to generate the array with function it won\'t populate its dropdown list.
$(\"#mix-artist\
You need your searchArtist function to take the process callback. Instead of returning the array you should call process(artists).
searchArtist
process
process(artists)