function getValueByPath(obj, path, seperator = ".") {
const pathArray = typeof path === "string" ? path.split(seperator) : path;
const [first, ...rest] = pathArray;
if (obj == null) return;
if (rest.length === 0) return obj[first];
return getValueByPath(obj[first], rest);
}