// SHORT VERSION WITHOUT ERROR LOGGING function getValueByObjectPath (obj, path) { return path.split('.').reduce((value, pathPart) => { try { return value[pathPart]; } catch (err) { throw err; } }, obj); }