---
schema_version: "1"
id: 09a1cde4b8f9417ecb763623566f679af75ee77ded9d0626f7e8bd3bd8a6304e
title: nodeExists
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-tree-functions-nodeexists.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-tree-functions-nodeexists
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f6461d369e339d9ff6c09dbe905cb69599adce7968b0ff20c11ec0ca32406c35
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# nodeExists

## [](#nodeexists1)nodeExists(Any, (value: Any, path: Path) -> Boolean): Boolean

ツリー内のいずれかのノードが、指定された条件に対して検証された場合、​`true`​ を返します。

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

<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>value</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>callback</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">条件。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、名前 ​`peter`​ のユーザーがあるかどうかを確認します。

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

```DataWeave
%dw 2.0
import * from dw::util::Tree
output application/json
---
 {
     user: [{
         name: "mariano",
         lastName: "achaval",
         friends: [
             {
                 name: "julian"
             },
             {
                 name: "tom"
             }
         ]
     },
     {
         name: "leandro",
         lastName: "shokida",
         friends: [
             {
                 name: "peter"
             },
             {
                 name: "robert"
             }
         ]

     }
     ],

 } nodeExists ((value, path) -> path[-1].selector == "name" and value == "peter")
```

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

```Json
true
```