JQuery: get current selector
<p>I have a form with multiple <code>select</code> dropdown menus that start with the id: package which are added dynamically by the user. My goal is to put all the selected values from these <code>select</code> dropdowns into an array. Here is the code I have so far.  </p>

<pre><code>$(document).ready(function() {

    arr = new Array();

    $(document).on('change', 'select[id ^="package"]', function() {
        arr.push($(this).val());
        alert(arr.join('\n')); //for testing
    });

});
</code></pre>

<p>Currently all I am doing is pushing the selected values onto the array rather than setting the values for a specific index. Therefore if I keep switching the value for a specific <code>select</code>, I will keep pushing values onto the array. How can I determine which selector I am currently in so I can get an index into the array to modify the array accordingly?</p>
