_renameDuplicateElement = function( { array, postfix= '_1', log=true } = {} ){
const newArray = _.cloneDeep(array)
for( let i = 0; i < newArray.length; i++){
const element = newArray[i]
const indexOfElementFound = array.indexOf(element)
const actualIndex = i
if (indexOfElementFound !== actualIndex) {
const newElement = element + postfix
newArray[actualIndex] = newElement
if(log){
console.log( `Renamed element ${element} at index ${actualIndex} as ${newElement}.` )
}
break
}
}
return newArray
}