jQuery each function only returning last result of total results
<p>I have an object with key : value pair. I'm looping through this object and if the key matches the value that's passed into my function I add it to another variable. The problem is that my code ends up looping through the results and only adding the last match to my new variable.</p>

<pre><code>function DirectoryOfBusinessSubs(parentID) {
     var myOpt = {"1":"&lt;option&gt;sub1&lt;/option&gt;","1":"&lt;option&gt;sub2&lt;/option&gt;"};
     var myList;
     $.each(myOpt, function(key, value) {
                    if(key == parentID){
                    myList += value;
                    }
                });
                alert(myList);
                c.append(myList);
        }
</code></pre>

<p>If I am passing in <code>1</code> for the key, <code>myList</code> should get both sub1 and sub2, but this code is only storing sub2 in <code>myList</code>.</p>
