Has key tester
[data/dictionary/Has key tester]
Tests whether a dictionary has a specific key. Example A:
{ "first": 1, "third": 3, "fifth": 5 } @0 received via
dict
"first"@0 received via
key
has
sends true@0
Example B:
{ "first": 1, "third": 3, "fifth": 5 } @0 received via
dict
"second"@0 received via
key
has
sends false@0
Keywords: dictionary, dict, has, key, contains, any, field, property
Input ports
dict:
{string: any}
Receives the dictionary to test. Example: { "first": 1, "third": 3, "fifth": 5 }
key:
string
Receives the key to look for in the dictionary. Example: "first"
Output ports
has:
boolean
Sends a value indicating whether the dictionary has the expected key. Example: true
Last updated