title: jQueryUI Autocomplete value different than label
body: <p>I have a <code>jQuery UI Autocomplete</code> that works fine, if the returned <code>json</code> object looks like this:</p>
  
  <pre><code>label:name
  value:name
  </code></pre>
  
  <p>Then it searches through myname and when the user selects one, it populates the input box with myname.  </p>
  
  <p>But what I want is for the json object to look like this:</p>
  
  <pre><code>label:name
  value:id
  </code></pre>
  
  <p>When I do this, the autocomplete populates the input box with the id number instead of the name string. </p>
  
  <p>How can I have the autocomplete set the displayed text to the name, and the hidden value to the value?  </p>
  
  <p>I don't see any way to do this in the official docs.  </p>
  
  <p>Here's my autocomplete:</p>
  
  <pre><code>$("#eventAccount").autocomplete({
          minLength: 2,
          source: function (request, response) {
              var term = request.term;
              if (term in cache) {
                  response(cache[term]);
                  return;
              }
  
              request.e = "getMyAccountAutocomplete";
  
              $.getJSON("/admin/ajaxController.php", request, function (data, status, xhr) {
                  cache[term] = data;
                  response(data);
              });
          }
      });
  </code></pre>
  
  <p>And the JSON it's getting back:</p>
  
  <pre><code>[{"label":"My fancy name","value":"229"}]
  </code></pre>