how to remove an item in a javascript array with json form
<p>i have this json structure and I made it into an array. I was trying to remove the entry, but this code failed on me: <a href="http://stackoverflow.com/questions/1728727/remove-item-from-array-if-it-exists-in-a-disallowed-words-array">http://stackoverflow.com/questions/1728727/remove-item-from-array-if-it-exists-in-a-disallowed-words-array</a></p>

<pre><code>var historyList = []; // assuming this already has the array filled

function add() {
     var newHistory = {
                ID: randomString(),
                Name: $('#txtVaccineName').val(),
                DoseDate: doseDate,
                ResultDate: resultDate,
                Notes: $('#txtResultNotes').val()
            };
     historyList.push(newHistory);
};

function removeEntry(value) {
  historyList.remove('ID', value);
};

Array.prototype.remove = function(name, value) {
            array = this;
            var rest = $.grep(this, function(item) {
                return (item[name] != value);
            });

            array.length = rest.length;
            $.each(rest, function(n, obj) {
                array[n] = obj;
            });
        };
</code></pre>
