title: Modifying JSON Ajax Request for Geonames
body: <p>I have the code I am after from an example site but I was wondering if anyone could tell me how to modify the code below to only return results from the USA.  </p>
  
  <p>This is the code I have so far:</p>
  
  <pre><code>  $(function() {
      function log( message ) {
        $( "&lt;div&gt;" ).text( message ).prependTo( "#log" );
        $( "#log" ).scrollTop( 0 );
      }
  
      $( "#city" ).autocomplete({
        source: function( request, response ) {
          $.ajax({
            url: "http://ws.geonames.org/searchJSON",
            dataType: "jsonp",
            data: {
              featureClass: "P",
              style: "full",
              maxRows: 12,
              name_startsWith: request.term
            },
            success: function( data ) {
              response( $.map( data.geonames, function( item ) {
                return {
                  label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
                  value: item.name
                }
              }));
            }
          });
        },
        minLength: 2,
        select: function( event, ui ) {
          log( ui.item ?
            "Selected: " + ui.item.label :
            "Nothing selected, input was " + this.value);
        },
        open: function() {
          $( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
        },
        close: function() {
          $( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
        }
      });
    });
  </code></pre>
  
  <p>Apparently you can request JSON like this:</p>
  
  <pre><code>http://ws.geonames.org/searchJSON?name_startsWith=Chic&amp;country=US
  </code></pre>
  
  <p>So my question is, how do I modify the code above to include "&amp;country=US" onto the request. I've tried a few things but it breaks the request entirely. </p>