Skip to content

jsonInsertIntoObject (JSON Creation & Manipulation)

Compatible with:
  • Purpose
  • This command is used to insert data into a JSON document. 
  • If the JSON document supplied in input is invalid, command fails with error "INVALID_JSON" If the path indicates a nonexistent path in the JSON, it adds the value to the JSON if::
  • 1) A member is not present in an existing object. The member is added to the object and associated with the new value.
  • 2) A position past the end of an existing array. The array is extended with the new value. If the existing value is not an array, it is auto wrapped as an array, then extended with the new value. Otherwise, a path/value pair for a nonexistent path in the document is ignored and has no effect.
  • Syntax
  • jsonInsertIntoObject({Json/VariableName} || {path,val},VariableName)
  • Multiple paths can be provided seperated by comma.
  • Target
  • {Json/VariableName} || {path,val}
  • Value
  • VariableName
  • Return Value
  • JSON Document

Example(s):

Click here to see the example

 

Feedback and Knowledge Base