---
schema_version: "1"
id: 4222610d66d6ef676181bfa1a31f521d87c77b7549418558191c16e246b86a3c
title: drop
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.5/dw-arrays-functions-drop.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.5/dw-arrays-functions-drop
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2212381414381f4405703e0b5c28c1637f8badbbef617cb223bb78e07bbe93f9
description: MuleSoft Documentation Site
release: "2.5"
latest: false
---
# drop

## [](#drop1)drop<T>(array: Array<T>, n: Number): Array<T>

最初の ​`n`​ 個の要素をドロップします。​`n <= 0`​ の場合は元の配列を返し、​`n > sizeOf(array)`​ の場合は空の配列を返します。

_DataWeave バージョン 2.2.0 で導入されました。_

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>array</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">要素の左配列。</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>n</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">取り除く要素の数。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、入力配列の 3 番目の要素のみを含む配列を返します。最初の 2 個の要素は出力からドロップされます。

#### [](#ソース)ソース

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

#### [](#出力)出力

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

## [](#drop2)drop(array: Null, n: Any): Null

`drop`​ を ​`null`​ 値に使用できるようにするヘルパー関数。

_DataWeave バージョン 2.4.0 で導入されました。_