---
schema_version: "1"
id: 5debc599c8a87f611e46667d5c9268d975f6a749854c78dda18b2913e0b3efdb
title: index
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/dw-values-functions-index.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/dw-values-functions-index
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f3c6cb03278a24d3d1b00315f50e73d41b153f10721d563c3896350b1e01547b
description: MuleSoft Documentation Site
release: "2.4"
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
 }
```