---
schema_version: "1"
id: 1f5e72fea19b867c4a73c1107c0e00ac7c26284b12e151fbcb981761b6e03937
title: isEmpty
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.11/dw-core-functions-isempty.md
canonical_url: https://docs.mulesoft.com/dataweave/2.11/dw-core-functions-isempty
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 91fdc6ff9058a8931b32003ba1ca1d5a6a9a011d5527a3cb7eecb0991dcd9cea
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: DataWeave
version: 2.11
---

# isEmpty

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## isEmpty(elements: Array<Any>): Boolean

Returns `true` if the given input value is empty, `false` if not.

This version of `isEmpty` acts on an array. Other versions act on a string or object, and handle
null values.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>elements</code></p></td><td><p>The input array to evaluate.</p></td></tr></tbody></table>

### Example

This example indicates whether the input array is empty.

#### Source

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

#### Output

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

## isEmpty(value: String): Boolean

Returns `true` if the input string is empty, `false` if not.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p>A string to evaluate.</p></td></tr></tbody></table>

### Example

This example indicates whether the input strings are empty.

#### Source

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

#### Output

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

## isEmpty(value: Object): Boolean

Returns `true` if the given object is empty, `false` if not.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p>The object to evaluate.</p></td></tr></tbody></table>

### Example

This example indicates whether the input objects are empty.

#### Source

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

#### Output

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

## isEmpty(value: Binary): Boolean

Returns `true` if the input binary is empty, `false` if not.

_Introduced in DataWeave version 2.11.0._

### Parameters

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p>Binary</p></td><td><p>The input binary value.</p></td></tr></tbody></table>

### Example

This example indicates whether the input binary is empty.

#### Source

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

#### Output

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

## isEmpty(value: Null): true

Returns `true` if the input is `null`.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p><code>null</code> is the value in this case.</p></td></tr></tbody></table>

### Example

This example indicates whether the input is `null`.

#### Source

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

#### Output

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