# Logstash mutate remove field name 'JSON'

**URL:** <https://discuss.elastic.co/t/logstash-mutate-remove-field-name-json/273572>\
**Category:** Logstash\
**Created:** [May 20, 2021, 6:19pm UTC](https://discuss.elastic.co/t/logstash-mutate-remove-field-name-json/273572 "2021-05-20T18:19:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raghav\_krishna\_agarw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raghav_krishna_agarw/32/89043_2.png) [@raghav\_krishna\_agarw](https://discuss.elastic.co/u/raghav_krishna_agarw)\
**Post date:** [May 20, 2021, 6:19pm UTC](https://discuss.elastic.co/t/logstash-mutate-remove-field-name-json/273572/1 "2021-05-20T18:19:11Z")

</div>

I am trying to remove a field name "JSON" in my mongoDB record, while dumping in ELK. But it is not working, may be the case of reserve keyword.

Below is the document structure:

```auto
"date" : <date>,
"name" : "xyz",
"JSON" : <JSON String>

```

I wan to remove JSON field. I already tried to rename this field and then remove that also didn't help.

Below is the filter code with rename:

```auto
mutate {
    rename => { 'JSON' => "data" }
    remove_field => ["data"]
}

```

Thanks in advance.

---

<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:** [June 17, 2021, 6:19pm UTC](https://discuss.elastic.co/t/logstash-mutate-remove-field-name-json/273572/2 "2021-06-17T18:19:49Z")

</div>

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