Fix order

This commit is contained in:
Peter Maquiran
2021-11-23 16:23:44 +01:00
parent 0fb342a463
commit 1f81744274
24 changed files with 134 additions and 78 deletions
@@ -0,0 +1,25 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class ObjectService {
constructor() { }
deepFind(obj, path) {
var paths = path.split('.')
, current = obj
, i;
for (i = 0; i < paths.length; ++i) {
if (current[paths[i]] == undefined) {
return undefined;
} else {
current = current[paths[i]];
}
}
return current;
}
}