How to get city and postal code from google maps API?
<p>How to get city and postal code from google maps API.My code look like this</p>

<pre><code>if (place.address_components) {                    
code = [place.address_components[0].types[0].postal_code];
alert(code);
document.getElementById('cityField').value = code;
}
</code></pre>

<p>but when i am trying this it alerts null.</p>

<p>Thanks in advance</p>
