---
schema_version: "1"
id: c7830388ee30977c7a16e3652af0449d793ea3de23b5beb52b027b3540b5c632
title: splitAt
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.8/dw-arrays-functions-splitat.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.8/dw-arrays-functions-splitat
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 9510655f610a2dc5d9478483c5262203fb1224c16bf77fb3a5205ff71304b847
description: MuleSoft Documentation Site
release: "2.8"
latest: false
---
# splitAt

## [](#splitat1)splitAt<T>(array: Array<T>, n: Number): Pair<Array<T>, Array<T>>

配列を、指定された位置で 2 つに分割します。

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

### [](#例)例

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

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

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

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

## [](#splitat2)splitAt(array: Null, n: Any): Null

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

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