mergeResults = function (blob, finalCollection, type) {
    if (blob[type] === undefined || blob[type].length === 0) { 
        return
    }
    blob[type].forEach(function (blobItem) {
        if (finalCollection[type].length === 0) {
            finalCollection[type].push(blobItem);
            return;
        }
        // add if this item if it does not already exist in final collection
        let itemExists = false;
        for (let fIndex in finalCollection[type]) {
            if (deepEqual(finalCollection[type][fIndex], blobItem)) {
                itemExists = true;
                break;
            } 

            // if item name matches, merge roles if available for everything other than intent
            if (type === LUISObjNameEnum.INTENT || 
                type === LUISObjNameEnum.PATTERNS || 
                type === LUISObjNameEnum.UTTERANCE ||
                finalCollection[type][fIndex].name !== blobItem.name) {
                    continue;
            }
    
            itemExists = true;
            (blobItem.roles || []).forEach(blobRole => {
                if (finalCollection[type][fIndex].roles && 
                    !finalCollection[type][fIndex].roles.includes(blobRole)) {
                        finalCollection[type][fIndex].roles.push(blobRole);
                }
            });
       
        }
        if (!itemExists) {
            finalCollection[type].push(blobItem);
        }
    });

}
Helper function to merge item if it does not already exist

@param {object} blob Contents of all parsed file blobs
@param {object} finalCollection Reference to the final collection of items
@param {LUISObjNameEnum} type Enum type of possible LUIS object types
@returns {void} Nothing