Reads a nested value from an object through a dotted property path.
Handles null/undefined safely at every level.
⚠️ Not interchangeable with Utils.resolveField() (general-utils.ts), despite the
similar purpose. Verified divergences (KERNEL S11):
a miss returns null here, "" there;
an empty path short-circuits to null here, but is traversed there;
resolveFielddiscards empty and whitespace-only strings, turning " " into a
miss, while this function returns them verbatim;
resolveField is variadic (first hit across several paths wins), this one is single-path.
Both are kept: they are published as GeoLeaf.Utils.getNestedValue /
GeoLeaf.Utils.resolveField and neither has an internal caller left, so unifying them
would change observable behaviour for integrators with no benefit to the library.
Type Parameters
T = unknown
Parameters
obj: object|null|undefined
Source object.
path: string
Dotted path to the property (e.g. 'user.address.city').
Reads a nested value from an object through a dotted property path. Handles null/undefined safely at every level.
⚠️ Not interchangeable with
Utils.resolveField()(general-utils.ts), despite the similar purpose. Verified divergences (KERNEL S11):nullhere,""there;pathshort-circuits tonullhere, but is traversed there;resolveFielddiscards empty and whitespace-only strings, turning" "into a miss, while this function returns them verbatim;resolveFieldis variadic (first hit across several paths wins), this one is single-path.Both are kept: they are published as
GeoLeaf.Utils.getNestedValue/GeoLeaf.Utils.resolveFieldand neither has an internal caller left, so unifying them would change observable behaviour for integrators with no benefit to the library.