Values getter by keys

[data/dictionary/Values getter by keys]


Retrieves multiple items' values from the dictionary by their keys, in the order of the keys provided. If any of the items are not found in the dictionary, a 'null' value will be sent in its place. Example A:

  1. { "first": 1, "third": 3, "fifth": 5 } @0 received via dict

  2. [ "first", "third" ]@0 received via keys

  3. values sends [ 1, 3 ]@0

Example B:

  1. { "first": 1, "third": 3, "fifth": 5 } @0 received via dict

  2. ["first","second"]@0 received via keys

  3. values sends [ 1, null ]@0

  4. not found keys sends ['second']@0


Keywords: dictionary, dict, get, values

Input ports

  • dict: {string: any}

    Receives the dictionary to get the values from. Example: { "first": 1, "third": 3, "fifth": 5 }

  • keys: string[]

    Receives the keys corresponding to the values to get. Example: ["first", "third"]

Output ports

  • values: {string: any}[string][]

    Sends the values corresponding to the received keys. Example: [1, 3]

  • not found keys: string[]

    Sends the not found keys. Example: ["second"]

Last updated