title: Jquery Tokeninput how to get name instead of the id
body: <p>I tried calling that, but it doesn't seem to return anything.. Am I doing something wrong?</p>
  
  <pre><code>     &lt;script type="text/javascript"&gt;
              $(document).ready(function() {
                  $("input[type=button]").click(function () {
                      alert("Would submit: " + $(this).siblings("input[type=text]").val());
                  });
              });
  
  
      $(document).ready(function() {
      $("#button1").click(function() {
  
  
                      var abc = $('#demo-input-local').tokenInput("get");
                      alert(abc);
                      alert(abc[7].name);
  
         var inputval =$(this).siblings("input[type=text]").val();
         alert("inputval " +inputval);
  
  alert(abc[inputval].name);
  
        $("#some-text").focusEnd();
  
         $('#some-text').val($('#some-text').val()+'  ' + inputval);
  
      });
      });
  
              &lt;/script&gt;
  
      &lt;label&gt; Enter Phone or Email or http: &lt;/label&gt;&lt;input type="text" id="demo-input-local" name="blah" /&gt;&lt;input type="button" id="button1" value="Submit" /&gt;
                                          &lt;script type="text/javascript"&gt;
                                              $(document).ready(function () {
                                                  $("#demo-input-local").tokenInput([
                                                  { id: 7, name: "john.doe@uhc.com", "value": "@" , "prefix": "Email1"},
                                                  { id: 11, name: "j.doe@uhc.com", "value": "@" ,"prefix": "Email2"},
                                                  { id: 13, name: "nancy.doe@uhc.com", "value": "@" ,"prefix": "Email3"},
                                                  { id: 17, name: "liz.d@uhc.com", "value": "@", "prefix": "Email4" },
                                                  { id: 19, name: "joe.doe@uhc.com", "value": "@", "prefix": "Email5" },
                                                  { id: 23, name: "www.C#.com", "value": "http", "prefix": "Website1" },
                                                  { id: 29, name: "www.C.com", "value": "http", "prefix": "Website2" },
                                                  { id: 31, name: "www.Fortran.com", "value": "http", "prefix": "Website3" },
                                                  { id: 37, name: "www.VisualBasic.com", "value": "http", "prefix": "Website4" },
                                                  { id: 41, name: "www.DoC.com", "value": "http", "prefix": "Website5" },
                                                  { id: 43, name: "www.C++.com", "value": "http" , "prefix": "Website6"},
                                                  { id: 47, name: "www.Java.com", "value": "http" , "prefix": "Website7"},  
                                                  { id: 37, name: "111-111-1111", "value": "#", "prefix": "Phone1" },
                                                  { id: 41, name: "222-222-2222", "value": "#", "prefix": "Phone2" },
                                                  { id: 43, name: "333-333-3333", "value": "#" , "prefix": "Phone3"},
                                                  { id: 47, name: "555-555-5555", "value": "#" , "prefix": "Phone4"}
  
  
                                               ], {
                                                   theme: "facebook",
  
                                                   propertyToSearch: "value",
                                                   hintText: "Type '@' for email or 'http' for website  or '#' for phone",
                                                   tokenFormatter: function (item) { return "&lt;li&gt;&lt;p&gt;" +  item.prefix + "&lt;/p&gt;&lt;/li&gt;" },
                                                   resultsFormatter: function (item) { return "&lt;li&gt;" + item.prefix +" "+ item.name + "&lt;/li&gt;" }
                                               });
                                              });
                                          &lt;/script&gt;
                                      &lt;/div&gt;
  </code></pre>