I'm trying to figure out how to remove item from serializedArray by using the index. The following scenario:
[
{ 'name' : 'item1', 'value' : '1' },
{ 'name' : 'item2', 'value' : '2' },
{ 'name' : 'item3', 'value' : 3 }
]
Now I would like to remove 'item2' - I can use the following function - but not sure how to remove it - is there some sort of unset() method or something like this:?
serializeRemove : function(thisArray, thisName) {
"use strict";
$.each(thisArray, function(index, item) {
if (item.name == thisName) {
// what to do here ?
}
});
}