> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/object/omit.md).

# omit()

Returns a new object without selected keys.

```javascript
const user = { id: 1, name: 'Ada', password: 'secret' };

omit(user, ['password']); // { id: 1, name: 'Ada' }
```

### Use cases

Use `omit()` to remove read-only or sensitive fields from a payload.

### More examples

Create an update payload without server-managed fields:

```javascript
const formState = {
  id: 42,
  name: 'Ada',
  email: 'ada@example.com',
  createdAt: '2026-10-01'
};

const update = omit(formState, ['id', 'createdAt']);
// { name: 'Ada', email: 'ada@example.com' }
```
