* Gets a nested value from an object by path segments. * For v1 with single-level correlation fields (e.g., `projectId`), it's just `obj[path[0]]`.
(obj: any, path: Array<string>)
| 2038 | * For v1 with single-level correlation fields (e.g., `projectId`), it's just `obj[path[0]]`. |
| 2039 | */ |
| 2040 | function getNestedValue(obj: any, path: Array<string>): any { |
| 2041 | let value = obj |
| 2042 | for (const segment of path) { |
| 2043 | if (value == null) return value |
| 2044 | value = value[segment] |
| 2045 | } |
| 2046 | return value |
| 2047 | } |
| 2048 | |
| 2049 | function matchesConditionalSelectGuards( |
| 2050 | guards: Array<{ |