# How I can delete element from array?

**URL:** <https://discuss.elastic.co/t/how-i-can-delete-element-from-array/205868>\
**Category:** Logstash\
**Created:** [October 30, 2019, 1:28pm UTC](https://discuss.elastic.co/t/how-i-can-delete-element-from-array/205868 "2019-10-30T13:28:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 30, 2019, 2:40pm UTC](https://discuss.elastic.co/t/how-i-can-delete-element-from-array/205868/2 "2019-10-30T14:40:02Z")

</div>

> [@gleb](#):
>
> if [app\_risk [1]] == "1"{ mutate {remove\_field =\> ["app\_risk[0]"] }

That should be

```
if [app_risk][1] { mutate { remove_field => "[app_risk][0]" } }

```

Note that it will still be an array with a single member.

---

_[View the full topic](https://discuss.elastic.co/t/how-i-can-delete-element-from-array/205868)._
