export function GetValueFromObjectByKey(
  obj: any,
  key: string,
): { result?: any; error?: string } {
  const keys = key.split('.');
  let res: any = obj;
  for (let i = 0; i < keys.length; i++) {
    const k = keys[i];
    if (!res.hasOwnProperty(k)) {
      return { error: 'NOT_FOUND' };
    }
    res = res[k];
  }
  return { result: res };
}
