(obj: any, path: string[])
| 66 | } |
| 67 | |
| 68 | export function getPathInObject(obj: any, path: string[]): any { |
| 69 | let current = obj; |
| 70 | for (const key of path) { |
| 71 | current = current[key]; |
| 72 | |
| 73 | if (current === undefined) { |
| 74 | return undefined; |
| 75 | } |
| 76 | } |
| 77 | return current; |
| 78 | } |