export class Helpers {

    public static objectReplaceRecursive(firstObj:any, twoObj:any): void
    {
        for(let field in twoObj){
            if(firstObj[field] && typeof firstObj[field] == 'object' && firstObj[field].constructor.name == 'Object'){
                this.objectReplaceRecursive(firstObj[field], twoObj[field]);
            }
            if(!firstObj[field] || typeof firstObj[field] != 'object' || firstObj[field].constructor.name != 'Object'){
                firstObj[field] = twoObj[field];
            }
        }
    }

}