Sorry for the delay in my response, but looks like your issue is actually because you are trying to reassign a variable vs replace the contents of the variable. For example, here is some sample code. The first one will fail if you run it through jsLint, while the second will pass and is the recommended way of reassigning the contents of your array:
Example 1 -- NOT GOOD --:
if(GetAlertIds.ticketIds.length > 0) {
var cleanedArray = new Array(GetAlertIds.ticketIds.length);
// Scrape out the 'Handle' part of the ticket id
for(var i = 0; i < GetAlertIds.ticketIds.length; i++) {
var andIndex;
if((andIndex = GetAlertIds.ticketIds[i].indexOf('@')) > -1) {
cleanedArray[i] = GetAlertIds.ticketIds[i].substring(andIndex + 1);
}
}
GetAlertIds.ticketIds = cleanedArray; // <-- You cannot do this, you are technically re-assigning the ~obj1~ to ~obj2~
}
Example 2 -- THE PROPER WAY --:
if(GetAlertIds.ticketIds.length > 0) {
var cleanedArray = new Array(GetAlertIds.ticketIds.length);
// Scrape out the 'Handle' part of the ticket id
for(var i = 0; i < GetAlertIds.ticketIds.length; i++) {
var andIndex;
if((andIndex = GetAlertIds.ticketIds[i].indexOf('@')) > -1) {
cleanedArray[i] = GetAlertIds.ticketIds[i].substring(andIndex + 1);
}
}
Array.prototype.splice.apply(GetAlertIds.ticketIds, [0, cleanedArray.length].concat(cleanedArray)); // <-- Here we replace the contents of ~obj1~ with the contents of ~obj2~
}
If you use example 2, you should be able to fix your issue.