Skip to main content

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

Output:

Example 2: Removing Internal Fields

Example 3: Filtering Node Properties for API Response

Example 4: Removing Non-Existent Keys

Output:
(Non-existent keys are ignored)

Notes

  • Returns empty map if input is not a valid object or is null
  • null values 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 removeKey multiple times
  • Useful for bulk removal of sensitive or internal fields

See Also

Frequently Asked Questions

removeKeys accepts a list of keys to remove in a single call, while removeKey removes only one key at a time.
Non-existent keys are silently ignored. Only keys present in the map are removed from the result.