Something like this might work for you:
var i;
var k;
for(i = 0; i < existingArray.length; i++){
var count = 2;
for(k = 0; k < existingArray.length; k ++){
if(i != k && existingArray[i].content.host.name === existingArray[k].content.host.name){
existingArray[k].content.host.name += '_' + count;
count++;
}
}
}
3
solved How to modify an array of objects containing values of the same name?