I am using this jquery ui autocomplete but i need to grab the data from a json object every keystroke and put it in the dropdown as the user types. But the example uses just an array
<script type="text/javascript">
$(function() {
var availableTags = ["ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme"];
$("#request_artist").autocomplete({
source: availableTags
});
});
</script>
I was thinking of doing the ajax request on the keypress but that completely contradicts the autocomplete functionality