Javascript Parsing with Bing Maps
<p>I am currently using Bing Maps and getting returned the value of Lat/Lon but I want to parse out the following.</p>

<p><a href="http://www.pastie.org/private/stz7u3cgvpn4g4evmheoq" rel="nofollow">http://www.pastie.org/private/stz7u3cgvpn4g4evmheoq</a></p>

<p>The second results of the location that includes the AddressLine, Locality, PostalTown, District, AddminDistrict, PotalCode and CountryRegion.</p>

<pre><code>function GetResults(locations) {
    if (locations) {
        for (var i = 0; i &lt; locations.length; i++) {
            s = locations[i].Name;
            //
            var addressSplit = s.split(", ");
            addresscode = addressSplit[0]
            citycode = addressSplit[1]
            statezip = addressSplit[2]
            country = addressSplit[3]
            var statezipSplit = statezip.split(" ");
            statecode = statezipSplit[0];
            zipcode = statezipSplit[1];
            var loc_array = new Array();
            loc_array[0] = addresscode;
            loc_array[1] = citycode;
            loc_array[2] = statecode;
            loc_array[3] = zipcode;
            window.locationArray = loc_array;
        }
    }
</code></pre>
