Description
Creates a new map with multiple specified keys removed. The original map is not modified.Syntax
Parameters
Returns
Type: map (object) A new map containing all properties from the input map except the specified keys. Returns an empty map if input is not a valid object.Examples
Example 1: Basic Multiple Key Removal
Example 2: Removing Internal Fields
Example 3: Filtering Node Properties for API Response
Example 4: Removing Non-Existent Keys
Notes
- Returns empty map if input is not a valid object or is
null nullvalues in the keys array are ignored- Keys that don’t exist in the map are silently ignored
- Creates a new map; does not modify the original
- More efficient than calling
removeKeymultiple times - Useful for bulk removal of sensitive or internal fields
See Also
- map.removeKey - Remove a single key
- map.submap - Keep only specific keys (inverse operation)
- map.merge - Combine multiple maps
Frequently Asked Questions
How does flex.map.removeKeys differ from removeKey?
How does flex.map.removeKeys differ from removeKey?
removeKeys accepts a list of keys to remove in a single call, while removeKey removes only one key at a time.What happens if some keys in the list do not exist?
What happens if some keys in the list do not exist?
Non-existent keys are silently ignored. Only keys present in the map are removed from the result.