Skip to content

omit

omit(object, keys) → object · Object

Return a new object WITHOUT the listed properties.

  • object (required): the source object

  • keys (required): array of property names to exclude

bash
echo '{"name": "Alice", "email": "alice@example.com", "password": "secret", "role": "admin"}' | utlx -e 'omit($input, ["password"])'
# {"name": "Alice", "email": "alice@example.com", "role": "admin"}
utlx
let safe = omit($input, ["password", "apiKey", "token", "secret"])
{
  sanitized: safe
}

Released under AGPL-3.0.