Controls For each item in
This block is used to iterate over input variable and each variable element is placed into a temporary variable during given iteration.
Input variable must be iterable. For example list, dict… Even strings are iterable, however in this case, iteration is performed on each letter in a string variable.
XML representation of the controls_for_each block
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="controls_for_each">
<field name="VAR">item</field>
<value name="LIST">
<block type="variables_get">
<field name="VAR">variable</field>
</block>
</value>
</block>
</xml>

Block “For each item in”

Example of “For each item in” block
Most common use of the block is shown in the example. For cycle checks “dst_ip”, “src_ip” and “remote_ip” keys, and if the key is found in the “item” dictionary, block “retype” performs retyping to the IP address data type.
{
"src_ip": "192.168.1.5",
"dst_ip": "8.8.8.8",
"remote_ip": "1.2.3.4",
"username": "administrator"
}

Results of “For each item in” block