Skip to content

setByPath

Since v3.3.0

Write value into row at the location described by pre-parsed path segments. Walks existing objects only — it does NOT fabricate missing intermediates — and returns true only when the write happened. Prototype-pollution safe (every segment is guarded).

function setByPath(row: unknown, path: readonly string[], value: unknown): boolean
NameTypeDescription
rowunknown
pathreadonly string[]
valueunknown
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt