Iterator
[data/dictionary/Iterator]
Iterates through items of a dictionary. The tag on the output signals will contain the index of the current iteration. Example:
{ "first": 1, "third": 3, "fifth": 5 } @0 received via
dict
key
sends "first"@0:0value
sends 1@0:0key
sends "third"@0:1value
sends 3@0:1key
sends "fifth"@0:2value
sends 5@0:2
More: https://github.com/Cranq-io/cranq-tutorials/tree/main/reference/1_application_flow/1_2_iterators
Keywords: dictionary, dict, foreach, each
Input ports
dict:
{string: any}
Receives the dictionary to iterate through. Example: { "first": 1, "third": 3, "fifth": 5 }
Output ports
value:
{string: any}[string]
Sends the value of the current item, with the tag corresponding to the iteration.
key:
string
Sends the key of the current item, with the tag corresponding to the iteration.
Last updated