Feature/amiriis missions
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
export const getValueByPath = (obj, path) => {
|
||||
const keys = path.split(".");
|
||||
|
||||
let value = obj;
|
||||
|
||||
for (const key of keys) {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
value = value[key];
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
export const getValueByPath = (obj, path) => {
|
||||
const keys = path.split(".");
|
||||
|
||||
let value = obj;
|
||||
|
||||
for (const key of keys) {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
value = value[key];
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user