# Logstash remove after split

**URL:** <https://discuss.elastic.co/t/logstash-remove-after-split/256608>\
**Category:** Logstash\
**Created:** [November 25, 2020, 7:12am UTC](https://discuss.elastic.co/t/logstash-remove-after-split/256608 "2020-11-25T07:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamilarasanbravo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamilarasanbravo/32/62962_2.png) [@tamilarasanbravo](https://discuss.elastic.co/u/tamilarasanbravo)\
**Post date:** [November 25, 2020, 7:12am UTC](https://discuss.elastic.co/t/logstash-remove-after-split/256608/1 "2020-11-25T07:12:30Z")

</div>

Hi Team,

I have configured a logstash http which receives JSON data. As part of the logstash filter I split a json field/value of array into 5 different key values. i.e.,

original Field

```auto
commits : { author : TJ
email: tj@email.com
added: adding details
modified: asadasd
}

```

Got modified into

```auto
commits.author: tj
commits.email : tj@email.com
commits.added : adding detail
commits.modified : asasas

```

Now, after it got split using split filter I am trying to delete `(commits.modified) `but I am unable to do so.

Pasting my current filter for further reference.

```auto
filter {
    split { field => "commits" }
    mutate { remove_field => ["[commits.modified]" ] }
}

```

Looking forward to any help.

Regards  
TJ

---

<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:** [November 25, 2020, 1:45pm UTC](https://discuss.elastic.co/t/logstash-remove-after-split/256608/2 "2020-11-25T13:45:40Z")

</div>

If [modified] is a field inside the [commits] object then in logstash that would be referred to as [commits][modified]. [commits.modified] would refer to a field that contains a period in its name.

If [commits] is a hash then I would expect split to log an error. It operates on arrays and strings, not hashes.

---

<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:** [December 23, 2020, 1:45pm UTC](https://discuss.elastic.co/t/logstash-remove-after-split/256608/3 "2020-12-23T13:45:53Z")

</div>

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