# For Each Loop - Dictionary

Iterates over all elements (Key-Value pairs) in the specified Dictionary, assigning the current dictionary element to the variables specified in the "Key" and "Value" properties during each iteration of the loop, and then the script execution continues towards the output "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 output of the block. Don't forget to connect the output of the last block in the loop body to the input of this block.

<table data-header-hidden><thead><tr><th width="254" valign="top"></th><th width="309" valign="top"></th></tr></thead><tbody><tr><td valign="top">Dictionary</td><td valign="top">[Dictionary] The dictionary whose elements need to be iterated.</td></tr><tr><td valign="top">Key</td><td valign="top">[Text] The variable that will store the Key of the current dictionary element before each iteration.</td></tr><tr><td valign="top">Value</td><td valign="top">[Object] The variable that will store the Value of the current dictionary element before each iteration.</td></tr><tr><td valign="top">Element Index</td><td valign="top">[Number] The ordinal number of the element. Numbering starts from zero.</td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Exit Direction</td><td valign="top"><p>Select the exit direction from the block in case of an error. Possible values:</p><ul><li>"Default" - by default;</li><li>"Right" - to the right;</li><li>"Bottom" - down.</li></ul><p>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).</p><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - outputs main information;</li><li>"Detailed" - outputs detailed information.</li></ul><p>If "Default" is selected, the value of the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block's work.</td></tr></tbody></table>
