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

## [](#some1)some<T>(list: Array<T>, condition: (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(list: Null, condition: (Nothing) -> Any): Boolean

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

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