title: How To Retrieve More Than One "GetValue" From JSON/AJAX search
body: <p>Ok, I'm struggeling with JSON, AJAX, Javascript and PHP.
  Well, actually its only Javascript.</p>
  
  <p>I want to have a input field which operates as a AutoSearch field.
  I am using currently EasyAutoComplete.</p>
  
  <p>But that doesnt really matter. What does matter is, that I have to choose one type from the JSON array to be searched. But I want to search both.</p>
  
  <p>Just to make things clear:
   - the user should be able to type in "abc" and "123" and find either the number "123456" or "School abc".
   - When the user clicks on the result, in both cases the field value should be the number.</p>
  
  <p>Javascript:</p>
  
  <pre><code>       $(document).ready(function(){
          var options = {
              url: function(phrase){
                  console.log("autocomplete/autocomplete.php?term="+phrase);
                  return "autocomplete/autocomplete.php?term="+phrase;
              },
              highlightPhrase: false,
              getValue: "instanz_id",
              template: {
                  type: "description",
                  fields: {
                  description: "schulname"
                  }
              },
              list: {
                  hideAnimation: {
                      type: "slide",
                      time: 400,
                      callback: function(){}
                  },
  
                  match:{
                      enabled: true
                  }
              }
          };
          $("#autocomplete").easyAutocomplete(options);
      });
  </code></pre>
  
  <p>My database structure looks like: </p>
  
  <p>"instanz_id", "schulname"</p>
  
  <p>"123456", "DemoSchule"</p>
  
  <p>Right now, if I type in "123" my JSON return string looks like this:</p>
  
  <pre><code> [{"instanz_id":"123456","schulname":"DemoSchule"}]
  </code></pre>
  
  <p>And my searchlist: "123456 - DemoSchule". When I click on it, 123456 is the new value of the input field.</p>
  
  <p>How can I get the same item in the searchlist when typing e.g. "Dem" ?
  I can change the getValue to "schulname" but then I cannot search using the number...</p>
  
  <p>Can please someone send me in the right direction?</p>