Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
export function getValueByPath<O extends Record<string, unknown>>(
obj: O,
path: string,
): unknown {
const pathArray = path.split(".");
// biome-ignore lint/suspicious/noExplicitAny: Fix this later
let curr: any = obj;
for (const part of pathArray) {
if (curr[part] === undefined) {
return undefined;
}
curr = curr[part];
}
return curr;
}