---
schema_version: "1"
id: 92eb7fe49a58c25b217ee4b35fec6e11274637871b4c16943df5a281beb36752
title: drop
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-arrays-functions-drop.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-arrays-functions-drop
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 51d56bed2f0dcb716980f5fca92c6dd9071798add625626a1eee78bbae378093
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# drop

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## drop(Array<T>, Number): Array<T>

Drops the first `n` elements. It returns the original array when `n <= 0` and an empty array when
`n > sizeOf(array)`.

_Introduced in DataWeave 2.2.0. Supported by Mule 4.2 and later._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>array</code></p></td><td><p>The left array of elements.</p></td></tr><tr><td><p><code>n</code></p></td><td><p>The number of elements to take.</p></td></tr></tbody></table>

### Example

This example returns an array that only contains the third element of the input array. It drops the
first two elements from the output.

#### Source

```DataWeave
 %dw 2.0
 import * from dw::core::Arrays
 var users = ["Mariano", "Leandro", "Julian"]
 output application/json
 ---
 drop(users, 2)
```

#### Output

```json
["Julian"]
```
