Skip to content

jsonGetDepth (JSON Creation & Manipulation)

Compatible with:
  • Purpose
  • This command is used to return maximum depth of the JSON document.   
  • If the JSON document supplied in input is invalid, command fails with error "INVALID_JSON". 
  • Syntax
  • JSONGetDepth({Json/VariableName},VariableName)
  • Target
  • jsonString/VariableName
  • Value
  • VariableName
  • Return Value
  • Returns maximum depth of the JSON document.   
  • Returns depth 1, if the input is an empty array, empty object, or scalar value.
  • Returns depth 2, if a nonempty array containing only elements of depth 1 or nonempty object containing only member values of depth 1.

Example(s):

Click here to see the example

 

Feedback and Knowledge Base