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

## [](#every1)every<T>(list: Array<T>, condition: (T) -> 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>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
var arr0 = [] as Array<Number>
output application/json
---
{ "results" : [
     "ok" : [
        [1,1,1] every ($ == 1),
        [1] every ($ == 1)
     ],
     "err" : [
        [1,2,3] every ((log('should stop at 2 ==', $) mod 2) == 1),
        [1,1,0] every ($ == 1),
        [0,1,1,0] every (log('should stop at 0 ==', $) == 1),
        [1,2,3] every ($ == 1),
        arr0 every true,
     ]
   ]
 }
```

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

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

## [](#every2)every(value: Null, condition: (Nothing) -> Any): Boolean

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

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