export const getHiddenKeys = (schema:any):string[] => { if (schema?.properties != undefined && schema?.properties != null) { let properties:any = Object.entries(schema?.properties); const hiddenKeys = properties?.filter(([key, value]) => { if(value?.hidden ){ return true; }else{ return schema?.hidden }}).map(([key, value]) => key); return hiddenKeys; } return [] } export const isHidden = (child: any,schema: any) => { const hiddenKeys = getHiddenKeys(schema) let scope = child?.scope; if (scope != undefined && scope != null){ let paths = scope.split("/"); if (hiddenKeys.includes(paths[paths.length - 1])) { return true; } } return false }