# Logstash bug while removing field

**URL:** <https://discuss.elastic.co/t/logstash-bug-while-removing-field/284562>\
**Category:** Logstash\
**Created:** [September 19, 2021, 12:13pm UTC](https://discuss.elastic.co/t/logstash-bug-while-removing-field/284562 "2021-09-19T12:13:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeoiioze](https://avatars.discourse-cdn.com/v4/letter/z/d07c76/32.png) [@zeoiioze](https://discuss.elastic.co/u/zeoiioze)\
**Post date:** [September 19, 2021, 12:13pm UTC](https://discuss.elastic.co/t/logstash-bug-while-removing-field/284562/1 "2021-09-19T12:13:57Z")

</div>

Hey,

I realized that the following line :

```auto
remove_field => ["[doc][vegetables][%{[tmp_vegetable_data][name]}]" ]

```

Was not only removing `[doc][vegetables][%{[tmp_vegetable_data][name]}]`, but was also like removing `[tmp_vegetable_data][name]`. Note that if you use `stdout { codec => rubydebug}`, you will still be able to see the `[tmp_vegetable_data][name]` field content, like if it was still there, but, **in reality, you cannot use the `[tmp_vegetable_data][name]` field content anymore (it's like empty in reality, even if the rubydebug codec is showing it as still available/present).**

I don't think it is an expected behaviour.

(logstash 7.14.0)

Have a good day !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 17, 2021, 12:14pm UTC](https://discuss.elastic.co/t/logstash-bug-while-removing-field/284562/2 "2021-10-17T12:14:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
