title: Extracting plus 4 zip code from geocoding using google API, jQuery
body: <p>I am using Geo coding using google API with the help of jQuery. The following is the code i tried. </p>
  
  <pre><code>jQuery(document).ready(function () {
  var geocoder = new google.maps.Geocoder();
  jQuery('AddressPicker1').autocomplete({
      source: function (request, response) {
          geocoder.geocode({ address: request.term}, function (results, status) {
          if (status === google.maps.GeocoderStatus.OK) {
            response(jQuery.map(results, function(item) {
            var streetNumber = "";
            var streetName = "";
            var cityName = "";
            var zip = "";
            var country = "";
            var countyName = "";
            var state = "";  
  
            for ( var component =0; component &lt; item.address_components.length; component++ ) {
               if (item.address_components[component] != undefined &amp;&amp; item.address_components[component] != null ) {
                    if ( jQuery.inArray("street_number", item.address_components[component].types) &gt; -1 ){
                        streetNumber = item.address_components[component].long_name;
                    }
  
                    if ( jQuery.inArray("route", item.address_components[component].types) &gt; -1){
                        streetName = item.address_components[component].long_name;
                    }
  
                    if ( jQuery.inArray("locality", item.address_components[component].types) &gt; -1){
                        cityName = item.address_components[component].long_name;
                    }
  
                    if ( jQuery.inArray("postal_code", item.address_components[component].types) &gt; -1){
                        zip = item.address_components[component].long_name;
                    }
  
                    if ( jQuery.inArray("country", item.address_components[component].types) &gt; -1){
                        country = item.address_components[component].long_name;
                    }
  
                    if ( jQuery.inArray("administrative_area_level_2", item.address_components[component].types) &gt; -1){
                          countyName = item.address_components[component].long_name;
                    }
  
                    if ( jQuery.inArray("administrative_area_level_1", item.address_components[component].types) &gt; -1){
                          state = item.address_components[component].short_name; 
                    }
              }
            }
      return {
          label : item.formatted_address,
          value : item.formatted_address,
          latitude : item.geometry.location.lat(),
          longitude : item.geometry.location.lng(),
          streetNo : streetNumber,
          streetName : streetName,
          city : cityName.toUpperCase() ,
          zip : zip,
          country : country,
          county : countyName.toUpperCase(),
          state : state
      }
  
       }));
     }
   });
   },
   select: function (event, ui) {
        jQuery('StreetNumber').val(ui.item.streetNo);
        jQuery('StreetName').val(ui.item.streetName);
        jQuery('City').val(ui.item.city);
        jQuery('Zip').val(ui.item.zip);
        jQuery('Country').val(ui.item.country);
        jQuery('CountyName').val(ui.item.county);
        jQuery('StateCode').val(ui.item.state);
        jQuery('GeocodedLatitude').val(ui.item.latitude);
        jQuery('GeocodedLongitude').val(ui.item.longitude);
  
   }
  </code></pre>
  
  <p>I faced the problem during searching plus 4 zip codes. i didn't get additional 4 digits in the response.
  Example ,For the search text, "60 MAIN ST,HUNTINGTON NY 11743-6961". 
  I retrieved the '11743' through 'postal_code' attribute in the response. But i cant able to retrieve '6961' from the response.  </p>
  
  <p>Is there any options to get the full zip code in this scenario?</p>
  
  <p>or I need to try for some other way to search plus 4 zip code.</p>
  
  <p>Thanks in advance.</p>