title: Jquery UI autocomplete select
body: <p>I need some help with the code below.</p>
  
  <pre class="lang-js prettyprint-override"><code>$("#auto_cp").autocomplete({
      minLength: 3,
      //source
      source: function(req, add) {
          $.getJSON("friends.php?callback=?", req, function(data) {
              var suggestions = [];
              $.each(data, function(i, val) {
                  suggestions.push(val.name);
              });
              add(suggestions);
          });
      },
      //select
      select: function(e, ui) {
          alert(ui.item.value);
      }
  });​
  </code></pre>
  
  <p>using FireBug, i'm getting this in my console :</p>
  
  <blockquote>
    <p>jQuery171003666625335785867_1337116004522([{"name":"97300 
    Cayenne","zzz":"203"},{"name":"97311 
    Roura","zzz":"201"},{"name":"97312 Saint 
    Elie","zzz":"388"},{"name":"97320 Saint Laurent du 
    Maroni","zzz":"391"},{"name":"97351 
    Matoury","zzz":"52"},{"name":"97354 Remire MontJoly 
    Cayenne","zzz":"69"},{"name":"97355 Macouria Tonate","zzz":"449"}])</p>
  </blockquote>
  
  <p>Everything is working very fine, but I don't know how to get the value of 'zzz' on select item.</p>
  
  <p>I tried</p>
  
  <pre><code>alert(ui.item.zzz);
  </code></pre>
  
  <p>But it doesn't work.</p>