check_for_matching_key_values
Verify that keys in a collection of maps match.
Arguments
| Name | Description | Type |
|---|---|---|
x | Collection of maps that may or may not contain one or more of keys. | maps |
keys | Collection of strings that define which keys should be tested in x. | strings |
Output value
Booleantrue or false if more than one of the keys were found in the maps and that all of the keys matched in each map for which there was a key/value pair.Example
x = [first: 'sherlock', second: 'john']
y = [first: 'mary', second: 'john']
println(check_for_matching_key_values([x,y], ['first']))
// false
println(check_for_matching_key_values([x,y], ['second']))
// true