Remove Selected Item from Array in jQuery Autocomplete
<p>I have this array, </p>

<pre><code>var metrics = [
        {
            value: "1",
            label: "Sold Listings",
            desc: "sold_listings"
        },
        {
            value: "10",
            label: "New Pendings",
            desc: "new_pendings"
        },
        {
            value: "4",
            label: "All Pendings",
            desc: "all_pendings"
        },
        {
            value: "2",
            label: "New Listings",
            desc: "new_listings"
        },
        {
            value: "3",
            label: "Active Listings",
            desc: "active_listings"
        }
    ];
</code></pre>

<p>What I wanted to do is to the Selected item, for example I will select Active Listings, this item should be deleted from the array. So that when  the autocomplete renders again, it won't show the selected item.</p>

<pre><code>//My Idea of removing the item
            $.each(metrics,function(i,val){
                if(val.value == ui.item.value){
                    delete metrics[i];
                }
            });
</code></pre>
