FIX: pipeline details now showing correct default values on s3 pipelines

This commit is contained in:
Gabriel Rosa
2022-11-09 17:35:18 -03:00
parent 5072a54ef6
commit 5fb8dae312
3 changed files with 20 additions and 12 deletions
+10
View File
@@ -0,0 +1,10 @@
export function getObjValueFromPath<T>(data: { object: T; path: string }): T {
const { object, path } = data;
const keys = path.split('.');
let value = JSON.parse(JSON.stringify(object));
for (const key of keys) {
if (value) value = value[key];
}
return value;
}