title: How to do jQuery autocomplete that passes a id and not a name?
body: <p>I was looking for jQuery UI Autocomplete because I needed on a <code>&lt;input /&gt;</code> but the problem is that I need to pass the id of the name completed. Let me explain:</p>
  
  <p>I have an array of names:</p>
  
  <pre><code>$names = array(
      array('name' =&gt; 'John', id =&gt; '1'),
      array('name' =&gt; 'Sarah', id =&gt; '2'),
      array('name' =&gt; 'Josh', id =&gt; '3)
  );
  </code></pre>
  
  <p>And then, with AJAX, the input will be autocompleted with one name of the array but then, when I submit, I need the id and not the name. How can I manage?</p>
  
  <p>Thanks in advance</p>