---
schema_version: "1"
id: ee4c8899e2c0de680a2266922de7a4f2fd97037544a0d5413af6f721a9fdfe91
title: index
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.8/dw-values-functions-index.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.8/dw-values-functions-index
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b47bc27a769fce06b0510425d46a79ebd97faf550b61efa4641cca1c667053af
description: MuleSoft Documentation Site
release: "2.8"
latest: false
---
# index

## [](#index1)index(index: Number): PathElement

この関数は、​_配列要素_​を選択するために使用する ​`PathElement`​ データ型を作成し、型の ​`selector`​ 項目に、指定されたインデックスを入力します。

`update`​ および ​`mask`​ 関数の一部のバージョンは、​`PathElement`​ を引数として受け入れます。

_DataWeave バージョン 2.2.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>index</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">インデックス。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、指定されたインデックスのセレクターを作成します。 セレクターの値を ​`0`​ に設定します。出力で ​`"kind"`​ キーの値が ​`"Array"`​ になっていることにも注意してください。

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

```DataWeave
%dw 2.0
output application/json
import * from dw::util::Values
ns ns0 http://acme.com/foo
---
index(0)
```

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

```Json
{
   "kind": "Array",
   "namespace": null,
   "selector": 0
 }
```