Is this as inefficient as it feels?
<p>I have a webpage with two lists.  A source list (represented by availableThings) populated by a search, and items that the user has selected (selectedThings).  I want to maintain a unique list of selectedThings, so I want to remove already selected things from the list of available things.  In my code snippet below, <code>data.AvailableThings</code> is populated from the server and has no knowledge of user-selected things.  The user can select up to 3 items, ergo <code>selectedThings.items</code> will contain no more than 3 items.  <code>availableThings.items</code> can potentially be a few thousand.</p>

<p>After <code>availableThings.items</code> gets populated, I feed it into ICanHaz for the HTML generation.  FWIW, I'm using jQuery for drag behavior between the lists, but the question is jQuery-agnostic.</p>

<pre><code>[... jQuery AJAX call snipped ...]
success: function (data) {

    availableThings.items = [];

    for (var thing in data.AvailableThings) {
        var addToList = true;

        for (var existing in selectedThings.items) {
            if (existing.Id === thing.Id) {
                addToList = false;
                break;
            }
        }

        if (addToList) {
            availableThings.items.push(thing);
        }
    }
}
</code></pre>
