Loop through 2 arrays in jquery and combine
<p>I have 2 arrays, one with cities, and another array with ID's...
I would like to loop both, and then output some HTML</p>

<p>Right now im only looping cities, and then appending some HTML to a  as following:</p>

<pre><code>if ($jq(".area").length &gt; 0) {

    var region = $jq(".hiddenFieldRegion").val();
    var cityIDs = $jq(".hiddenFieldChosenAreas").val();
    var strcities = $jq(".hiddenFieldChosenCities").val();
    //var cities = strcities.split('|');

    //Set region to be marked
    if (region) {
        $jq(".mapdk").attr("class", region);
    }

    //Appending to searchform
    if (strcities) {
        $jq.each(strcities.toString().split("|"), function (k, v) {
            var v = v.split("|");
            $jq("&lt;option selected /&gt;").text(v[0]).appendTo("select.chosen-cities");
        });
    }

}
</code></pre>

<p>I would like the place where im appending to the searchform, add an attribute value, with an ID from the cityIDs array...</p>

<p>So i get some HTML like:</p>

<pre><code>&lt;option value="XXX"&gt;CityName&lt;/option&gt;
</code></pre>

<p>Is that possible?</p>
