title: jQuery .autocomplete() with postal code and cityname in one input field
body: <p>Hi I'm trying to build a field with autocomplete for Geo-Data (geonames.org API).</p>
  
  <p>I figured out how to solve input for postal code and for searching by cityname. I want to do it that it can include both. If I search with a cityname it shuold also display all possible zip-codes of the recent cities.</p>
  
  <p>I hope you could help me or give me a hint.</p>
  
  <p>My code is:</p>
  
  <pre><code>$(function () {
      function log(message) {
          $("#log").text(message);
          $("#log").scrollTop(0);
      }
  
      $("#city").autocomplete({
          source: function (request, response) {
              $.ajax({
                  url: "http://api.geonames.org/postalCodeSearchJSON",
                  dataType: "jsonp",
                  data: {
                      postalcode_startsWith: request.term,
                      maxRows: 10,
                      country: "DE",
                      username: "username"
                  },
                  success: function (data) {
                      response($.map(data.postalCodes, function (item) {
                          return {
                              label: item.postalCode + "-" + item.placeName,
                              value: item.postalCode + "-" + item.placeName
                          }
                      }));
                  }    
              });
  
          },
          minLength: 2,
          select: function (event, ui) {
              log(ui.item ?
                "Sie haben: " + ui.item.label + " ausgewählt ":
                "Nichts ausgewählt " + this.value);
          }
      });
  });
  </code></pre>