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

## [](#some1)some(Array<T>, (T) -> Boolean): Boolean

配列内の 1 つ以上の要素が指定された条件に一致すると ​`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>list</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
 ---
 { "results" : [
     "ok" : [
       [1,2,3] some (($ mod 2) == 0),
       [1,2,3] some ((nextNum) -> (nextNum mod 2) == 0),
       [1,2,3] some (($ mod 2) == 1),
       [1,2,3,4,5,6,7,8] some (log('should stop at 2 ==', $) == 2),
       [1,2,3] some ($ == 1),
       [1,1,1] some ($ == 1),
       [1] some ($ == 1)
     ],
     "err" : [
       [1,2,3] some ($ == 100),
       [1] some ($ == 2)
     ]
   ]
}
```

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

```JSON
{
   "results": [
     {
       "ok": [ true, true, true, true, true, true, true ]
     },
     {
       "err": [ false, false ]
     }
   ]
 }
```

## [](#some2)some(Null, (Nothing) -> Boolean): Boolean

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

_DataWeave 2.3.0 で導入されました。Mule 4.3 以降でサポートされます。_