# Logstash filter to remove a parent in a big array

**URL:** <https://discuss.elastic.co/t/logstash-filter-to-remove-a-parent-in-a-big-array/190289>\
**Category:** Logstash\
**Created:** [July 12, 2019, 6:31pm UTC](https://discuss.elastic.co/t/logstash-filter-to-remove-a-parent-in-a-big-array/190289 "2019-07-12T18:31:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tellus83](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@tellus83](https://discuss.elastic.co/u/tellus83)\
**Post date:** [July 12, 2019, 6:31pm UTC](https://discuss.elastic.co/t/logstash-filter-to-remove-a-parent-in-a-big-array/190289/1 "2019-07-12T18:31:17Z")

</div>

I simply want to remove the parent in a big array whitout creating mute rname rules for all felds.

This is what i have now.

```
"timestamp": "2019-07-12T15:37:06.516Z",
"foo": {
  "bar": {
    "number": "one"
  }
},
"value1": "1",
"result": {
  "value2": "nr1",
  "value3": {
    "state": "new",
    "foo1": "bar",
    "foo2": "bar2"
  },
  "value234": "1323"
}

```

And what i want is:

```
"timestamp": "2019-07-12T15:37:06.516Z",
"foo": {
  "bar": {
    "number": "one"
  }
},
"value1": "1",
"value2": "nr1",
"value3": {
  "state": "new",
  "foo1": "bar",
  "foo2": "bar2"
},
"value234": "1323"

```

What is the best and simplest way to this?

---

<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:** [July 12, 2019, 7:07pm UTC](https://discuss.elastic.co/t/logstash-filter-to-remove-a-parent-in-a-big-array/190289/2 "2019-07-12T19:07:03Z")

</div>

A ruby filter, like [this](https://discuss.elastic.co/t/how-to-dynamically-move-nested-key-value-to-root-level/180006/2).

---

<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:** [August 9, 2019, 7:07pm UTC](https://discuss.elastic.co/t/logstash-filter-to-remove-a-parent-in-a-big-array/190289/3 "2019-08-09T19:07:09Z")

</div>

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