For Each Json Loop#
Iterates over all elements (Key-Value pairs) in the specified Json object, assigning the current dictionary element to the variables specified in the Key and Value properties during each iteration of the loop. The script execution then continues towards the exit Element of this block (into the so-called "loop body").
After iterating through all elements of the Dictionary, the script execution continues towards the lower exit of the block. Don't forget to connect the exit of the last block in the loop body to the entry of this block.
| Json Object | [Object] The Json object to iterate over. You can obtain the object using the "Convert JSON to Object" block with the "Alternative Method" property enabled. |
| Name | [Text] The name of the Json field. |
| Value | [Any type] The value of the Json field. |
| Element Index | [Number] The ordinal number of the element. Numbering starts from zero. |
| If Array | [Boolean] Indicates that the value of the current element is an array. In this case, the For Each Loop (List) block can be used. |
| If Object | [Boolean] Indicates that the value of the current element is an object. In this case, the same block can be used to iterate over the values of this object. |
| Error Handling Level | Select the error handling level. Possible values:
If "Default" is selected, the value of the "Start" block of this diagram will be used. |
| Exit Direction | Select the exit direction from the block in case of an error. Possible values:
This property allows you to determine the exit direction in case of errors for blocks that do not contain the "If Error" connector (for example, the "Condition" block). If "Default" is selected, the value of the "Start" block of this diagram will be used. |
| Message Level | Select the message level that blocks will output during operation. Possible values:
If "Default" is selected, the value of the "Start" block of this diagram will be used. |
| Error Text | [Text] Returns detailed information about the error in case of incorrect execution of the block's work. |