---
id: api/utilities/lodash
title: Cypress._ | Cypress Documentation
description: Cypress automatically includes lodash and exposes it as Cypress._.
section: api
source_path: docs/api/utilities/lodash.mdx
version: e6988a974973e9090ce70406c38cb2b9e0eac9fa
updated_at: '2026-05-15T15:50:22.536Z'
---
# Cypress.\_

Cypress automatically includes [lodash](https://lodash.com/) and exposes it as `Cypress._`. Call any valid Lodash method on `Cypress._`

## Syntax

```
Cypress._.method()
```

### Usage

**Correct Usage**

```
Cypress._.keys(obj)
```

**Incorrect Usage**

```
cy._.keys(obj) // Errors, cannot be chained off 'cy'
```

## Examples

### `_.each`

```
// set local reference to lodash and jqueryconst { _, $ } = Cypresscy.get('li').then(($li) => {  // use the _.each function  _.each($li.get(), (el, i) => {    // use $(...) to wrap the DOM element    // into a jQuery object    expect($(el).parent()).to.match('ul')  })})
```

### `_.chain`

```
cy  // use the _.chain, _.map, _.take, and _.value functions  .request('http://jsonplaceholder.typicode.com/users')  .then((response) => {    const ids = Cypress._.chain(response.body).map('id').take(3).value()    expect(ids).to.deep.eq([1, 2, 3])  })
```

## See also

*   [Bundled Libraries](/llm/markdown/app/references/bundled-libraries.md)
