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

## [](#splitwhere1)splitWhere(Array<T>, (item: T) -> Boolean): Pair<Array<T>, Array<T>>

配列を、条件を満たす最初の位置で 2 つに分割します。

_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>

### [](#例)例

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

```DataWeave
%dw 2.0
import * from dw::core::Arrays
output application/json
var users = ["Mariano", "Leandro", "Julian", "Tomo"]
---
users splitWhere (item) -> item startsWith "Jul"
```

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

```json
{
  "l": [
    "Mariano",
    "Leandro"
  ],
  "r": [
    "Julian",
    "Tomo"
  ]
}
```