---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: filterEmptyAttribute (list, key)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Given a map list of objects, returns the objects that don't contain an attribute with the given key. If an object doesn't contain an attribute value that matches the given key, the `filterEmptyAttribute` treats that attribute as an empty attribute. `filterEmptyAttribute` includes an object with an empty attribute in the returned list.

## <a id="section_cyq_j1m_zsb"></a>Return Type

`List`

## <a id="section_dz5_pwg_5db"></a>Namespace Function Syntax

```
list:filterEmptyAttribute(list, key)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>list</td><td>A list of object maps.</td></tr><tr><td>key</td><td>An attribute key to find in the map list.</td></tr></tbody></table><br/>

<b>Example</b>

Assume <i>theList</i> is <i>[{"key0": "value0"}, {"key0": "value1"}, {"key2", "value2"}]</i>.

`list:filterEmptyAttribute(theList, 'key0')`

Because the object <i>{"key2", "value2"}</i> is the only object that doesn't contain an attribute whose key matches <i>key0</i>, `filterEmptyAttribute` returns only <i>{"key2", "value2"}</i> in this returned list.

`[{'key2': 'value2'}]`

