---
schema_version: "1"
id: 8656c37fb8f0ceec2313af29040df6896cadaef460e519e67f76ce8dfd561184
title: dropWhile
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-arrays-functions-dropwhile.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-arrays-functions-dropwhile
source_site: docs.mulesoft.com
content_type: documentation
content_hash: d54ade0ddc74d05d8db015c146d8f1daf398ba4cca253803ddd9990aeb14b4e7
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# dropWhile

## [](#dropwhile1)dropWhile(Array<T>, (item: T) -> Boolean): Array<T>

条件を満たす場合に要素を配列から削除しますが、条件を満たさない要素に達したら選択プロセスを停止します。

_DataWeave 2.2.0 で導入されました。Mule 4.2 以降でサポートされます。_​

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

<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>condition</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">配列の要素の照合に使用される条件 (式)。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、​`2`​ 以下の要素を省略する配列を返します。 最後の 2 つの要素 (​`2`​ と ​`1`​) が出力配列に含まれます。これは、​`3`​ (​`2`​ より大きい) に達した時点で関数が要素の削除を停止するためです。

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

```DataWeave
%dw 2.0
import * from dw::core::Arrays
output application/json
var arr = [0,1,3,2,1]
---
arr dropWhile $ < 3
```

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

```json
[
  3,
  2,
  1
]
```