for autocomplete in jquery it doesn't show the list

$.ajax({
    type: "GET",
    url: appUrl + '/somepath/tags',
    success: function (data) {                  
        for (var i = 0; i < data.length; i++){
            entireTags.push(data[i]);
        }
        $("#search").autocomplete({source: entireTags});     
    }
});

data looks like this:

["tag1", "tag2", "tag3", "tag4", ..., "tagN"]

After entering text, it doesn't automatically show the matched list.itshows when pressing Down.

Try to place console.log after the for loop and check whats the values you are getting in the array "entireTags"

 for (var i = 0; i < data.length; i++){
        entireTags.push(data[i]);
    }
  console.log(entireTags);