title: Setting the source of autocomplete remotely
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3308935/jquery-autocomplete-this-source-is-not-a-function-error">jquery autocomplete this.source is not a function error</a>  </p>
  </blockquote>
  
  
  
  <p>I have an autocomplete which I want to hook upto my API to return all customer account numbers. The problem is my API returns an object: AccountNumber, InvoiceNumber, Name, Address etc.. When I try to make my source the AccountNumber only, like below:</p>
  
  <pre><code>$.getJSON('/api/Customers', function(data) {
      $("#AccountNumber").autocomplete({
          source: data.AccountNumber,
          minLength: 4
      });
  });
  </code></pre>
  
  <p>I get back this error:</p>
  
  <pre><code>Uncaught TypeError: Property 'source' of object #&lt;Object&gt; is not a function
  </code></pre>
  
  <p>Any ideas what Im doing wrong here?</p>