# Remove elements when value is empty

**URL:** <https://forum.alumio.com/t/remove-elements-when-value-is-empty/952>\
**Category:** Data Transformers\
**Created:** [January 27, 2024, 1:50pm UTC](https://forum.alumio.com/t/remove-elements-when-value-is-empty/952 "2024-01-27T13:50:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniellefers](https://forum.alumio.com/user_avatar/forum.alumio.com/daniellefers/32/1563_2.png) [@daniellefers](https://forum.alumio.com/u/daniellefers)\
**Post date:** [January 27, 2024, 1:50pm UTC](https://forum.alumio.com/t/remove-elements-when-value-is-empty/952/1 "2024-01-27T13:50:23Z")

</div>

Hi all,

Running into a situation where I need to remove elements in an array when a certain value is empty. Thought I could use a value remover in my transformer with an JMESPath Expression (result[?id = ``]), but that does not seem to work.

In this case a need to remove an object in an array whenever the id of this object is null or empty.

Input:

```auto
{
    "result" : [
        {
            "id": "001",
            "value": "vaue 001"
        },
        {
            "id": null,
            "value": "vaue 002"
        },
        {
            "id": "003",
            "value": "vaue 003"
        }
    ]
}

```

Expected Result:

```auto
{
    "result" : [
        {
            "id": "001",
            "value": "vaue 001"
        },
        {
            "id": "003",
            "value": "vaue 003"
        }
    ]
}

```

Help would be appreciated!

---

<div class="post-metadata">

**Author:** ![r.candrian](https://forum.alumio.com/user_avatar/forum.alumio.com/r.candrian/32/235_2.png) [@r.candrian](https://forum.alumio.com/u/r.candrian)\
**Post date:** [January 29, 2024, 7:18am UTC](https://forum.alumio.com/t/remove-elements-when-value-is-empty/952/2 "2024-01-29T07:18:55Z")

</div>

Hi @daniellefers,

You can achieve that using a node filter like this:

 ![image](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/2X/0/069c46c61b4a954d5e6bcf04829bafda48f00bea.png)

Could you please kindly try it out?
