Skip to content

JSONPath Tools / @jsonpath-tools/jsonpath / replaceAtPaths

Function: replaceAtPaths()

ts
function replaceAtPaths(
   value, 
   paths, 
   replacer): undefined | JSONValue

Replaces JSON values at the given normalized paths.

Parameters

value

JSONValue

JSON value.

paths

readonly NormalizedPath[]

Normalized paths.

replacer

(value) => undefined | JSONValue

JSON value that should be used as a replacement or a function to create that value based on the replaced value.

Returns

undefined | JSONValue