pushNDepthChild = function(entity, childEntityName, context, childFeatures, childEntityType = "", children = []) {
    if (!entity.children) {
        entity.children = new Array(new helperClass.childEntity(childEntityName,childEntityType, context, children, childFeatures));
    } else {
        // de-dupe and push this child entity    
        let childExists = (entity.children || []).find(item => item.name == childEntityName);
        if (!childExists) {
            entity.children.push(new helperClass.childEntity(childEntityName, childEntityType, context, children, childFeatures));
        } 
    }
}
Helper to add an nDepth child entity to the collection.
@param {Object} entity 
@param {String} childEntityName 
@param {Object} context 
@param {String []} childFeatures 
@param {String} childEntityType 
@param {Object []} children