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

## [](#every1)every(Array<T>, (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, true ]
     }
   ]
 }
```

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

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

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