Builder (key & value)
Last updated
Last updated
[data/dictionary/Builder (key & value)]
Builds a dictionary based on an array of keys and a single value for all items. Example:
[ "first", "third", "fifth" ]@0 received via keys
1@0 received via value
dict
sends { "first": 1, "third": 1, "fifth": 1 }@0
More: https://github.com/Cranq-io/cranq-tutorials/tree/main/reference/2_constructing_data/2_2_builders
Keywords: dictionary, dict, build, new, create
key: string
Receives the keys to construct the dictionary from. Example: ["first","third","fifth"]
value: any
Receives the value to assign to all items. Example: 1
dict: {string: any}
Sends the resulting dictionary. Example: { "first": 1, "third": 1, "fifth": 1 }