add badge for sidebar

This commit is contained in:
Amirhossein Mahmoodi
2024-08-27 13:00:17 +03:30
parent 1bd0f7f606
commit cb2248e108
7 changed files with 80 additions and 3 deletions

View File

@@ -0,0 +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;
}