[jQuery] [Autocomplete] Input edit does not fire autocomplete.

[jQuery] [Autocomplete] Input edit does not fire autocomplete.


Coded the following in a page :
var ArrayVariable = New Array();
$(document).ready(function() {
$("#inputbox").autocompleteArray(ArrayVariable, {
delay: 10,
minChars: 1,
matchSubset: 1,
onItemSelect: selectItem,
onFindValue: findValue,
autoFill: true,
maxItemsToShow: 10
});
});
Filling the input box does not present the list of matching array
elements. I believe the array has the wrong structure because it is
not recognized in jQuery.fn.autocomplete. options.data is set to null
because data.constructor does not return an array.
The array is filled by looping through all elements of a json stucture
returned from an ajax call as in ArrayVariable[index] = jsonResponse
[i]. It appears to be a normal array when looking at it with visual
studio.
I've also tried to create a string as in var ArrayVariable = ""; and
ArrayVariable = "[ 'elementone', 'elementtwo', 'elementthree']"; but
that was not successfull either.
Can someone indicate the correct structure of the array required.