---
schema_version: "1"
id: 53e7f6272fae80b947c7fc201439712cc90afd5f84cb5455be70192f00e4095a
title: isEmpty
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dw-core-functions-isempty.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dw-core-functions-isempty
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 75bc6c581ca2fb1128da6d90161a9b342c5a8ccd515d66fbcab28134ffe515b2
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# isEmpty

## [](#isempty1)isEmpty(Array<Any>): Boolean

特定の入力値が空の場合は ​`true`​、それ以外の場合は ​`false`​ を返します。

このバージョンの ​`isEmpty`​ は、配列で動作します。その他のバージョンは、文字列またはオブジェクトで動作し、null 値を処理します。

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

<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>elements</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">評価する入力配列。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、入力配列が空かどうかを示します。

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

```DataWeave
%dw 2.0
output application/json
---
[ isEmpty([]), isEmpty([1]) ]
```

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

```JSON
[ true, false ]
```

## [](#isempty2)isEmpty(String): Boolean

入力文字列が空の場合は ​`true`​、それ以外の場合は ​`false`​ を返します。

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

<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>
</tbody>
</table>

### [](#例-2)例

次の例では、入力文字列が空かどうかを示します。

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

```DataWeave
%dw 2.0
output application/json
---
[ isEmpty(""), isEmpty("DataWeave") ]
```

#### [](#出力-2)出力

```JSON
[ true, false ]
```

## [](#isempty3)isEmpty(Null): Boolean

入力が ​`null`​ の場合は ​`true`​ を返します。

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

<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">この場合は ​<code>null</code>​ が値です。</p></td>
</tr>
</tbody>
</table>

### [](#例-3)例

次の例では、入力が ​`null`​ かどうかを示します。

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

```DataWeave
%dw 2.0
output application/json
---
{ "nullValue" : isEmpty(null) }
```

#### [](#出力-3)出力

```JSON
{ "nullValue": true }
```

## [](#isempty4)isEmpty(Object): Boolean

特定のオブジェクトが空の場合は ​`true`​、それ以外の場合は ​`false`​ を返します。

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

<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>
</tbody>
</table>

### [](#例-4)例

次の例では、入力オブジェクトが空かどうかを示します。

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

```DataWeave
%dw 2.0
output application/json
---
[ isEmpty({}), isEmpty({name: "DataWeave"}) ]
```

#### [](#出力-4)出力

```JSON
[ true, false ]
```