remove_keys_from_map

Given a map, remove one or more keys and return the result.

github

Arguments

NameDescriptionType
xMap that includes all of keys.map
keyRemove this one key from x. Cannot be used with keys.string
keysRemove this collection of keys from x. Cannot be used with key.strings

Output value

The input map x with key/keys removed.

Example

map = [first: 'sherlock', second: 'john', third: 'james']

remove_keys_from_map(map, 'third')
// { "first": "sherlock", "second": "john" }

remove_keys_from_map(map, ['second','third'])
// { "first": "sherlock" }