Skip to content

jsonMergeObjects (JSON Creation & Manipulation)

Compatible with:
  • Purpose
  • This command is used to merge two or more JSON documents to a single document.  
  • If the JSON document supplied in input is invalid, command fails with error "INVALID_JSON" Merging takes place according to the following rules
  • 1) Adjacent arrays are merged to a single array.
  • 2) Adjacent objects are merged to a single object.
  • 3) A scalar value is autowrapped as an array and merged as an array.
  • 4) An adjacent array and object are merged by autowrapping the object as an array and merging the two arrays.
  • Syntax
  • jsonMergeObjects({Json1/VariableName1} || {Json2/VariableName2} ....{JsonN/VariableNameN},VariableName)
  • Target
  • {Json1/VariableName1} || {Json2/VariableName2} ....{JsonN/VariableNameN}
  • Value
  • VariableName
  • Return Value
  • JSON Document

Example(s):

Click here to see the example

 

Feedback and Knowledge Base