Javascript: How to remove specifice array by key

Javascript: How to remove specifice array by key

Function to remove specific array by key 


function removeExistingRecords(key) {
    try {
        for (var i = arr.length - 1; i >= 0; i--) {
            if (arr[i][0] == key) {
                arr.splice(i, 1);
            }
        }
    } catch (e) { }

}
Tagged: Javascript

No comments:

Post a Comment