Skip to content

jsonReplaceValuesByPaths (JSON Creation & Manipulation)

Compatible with:
  • Purpose
  • This command is used to replace existing values in the JSON document.  
  • If the JSON document supplied in input is invalid, command fails with error "INVALID_JSON".
  • If the path mentioned is not part of the JSON document, command fails with error "INVALID_JSON_PATH".The document produced by evaluating one pair becomes the new value against which the next pair is evaluated. A path/value pair for an existing path in the document overwrites the existing document value with the new value.

    If the path is "$" or contain wildcard characters, command fails with error "One of the JSON Path is either Null or having wild card characters"

  • Syntax
  • jsonReplaceValuesByPaths({Json/VariableName} || {path, val},VariableName)
  • Multiple path, value combinations can be mentioned seperated by pipe (||)
  • Target
  • {Json/VariableName} || {path, val}
  • Value
  • VariableName
  • Return Value
  • JSON Document

Example(s):

Click here to see the example

 

Feedback and Knowledge Base