const getChannel = (obj) => { let regex = /^frozenChat.*EndTime$/; return Object.keys(obj).filter(key => regex.test(key)).find(key => obj[key]).replace('frozenChat','').replace('EndTime', ''); }