MCPcopy Index your code
hub / github.com/TanStack/db / getNestedValue

Function getNestedValue

packages/db/src/query/compiler/index.ts:2040–2047  ·  view source on GitHub ↗

* 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>)

Source from the content-addressed store, hash-verified

2038 * For v1 with single-level correlation fields (e.g., `projectId`), it's just `obj[path[0]]`.
2039 */
2040function 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
2049function matchesConditionalSelectGuards(
2050 guards: Array<{

Callers 1

compileQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected