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

# isEmpty

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

## isEmpty(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(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(Null): Boolean

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 }
```

## isEmpty(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 ]
```
