# 7y8ui9o

**URL:** <https://discuss.elastic.co/t/7y8ui9o/121025>\
**Category:** Logstash\
**Created:** [February 22, 2018, 10:24am UTC](https://discuss.elastic.co/t/7y8ui9o/121025 "2018-02-22T10:24:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eswar\_Kumar\_Musiboin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eswar_kumar_musiboin/32/28623_2.png) [@Eswar\_Kumar\_Musiboin](https://discuss.elastic.co/u/Eswar_Kumar_Musiboin)\
**Post date:** [February 22, 2018, 10:24am UTC](https://discuss.elastic.co/t/7y8ui9o/121025/1 "2018-02-22T10:24:12Z")

</div>

Continuing the discussion from [Ruby filter loop through fields in logstash 5?](https://discuss.elastic.co/t/ruby-filter-loop-through-fields-in-logstash-5/72026/2):

> [@Ruby filter loop through fields in logstash 5?](https://discuss.elastic.co/t/ruby-filter-loop-through-fields-in-logstash-5/72026/2):
>
> ="Maxwell\_Flanders, post:1, topic:72026"]
> 
> have been using a ruby filter to loop through all top-level fields and do a gsub to remove some special characters. I know that in 5.0, the Event API has changed significantly with an impact on ruby filters, namely the use of getters and setters instead of directly changing field values. My
> 
> +1 I have the same issue. Did you find a way to solve it ?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 22, 2018, 10:51am UTC](https://discuss.elastic.co/t/7y8ui9o/121025/2 "2018-02-22T10:51:44Z")

</div>

Please edit your post and pick a better subject than "7y8ui9o".

You can call to\_hash on the event object and get a hash that you can iterate over, like in Logstash 1.x and 2.x.

---

<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:** [March 22, 2018, 10:52am UTC](https://discuss.elastic.co/t/7y8ui9o/121025/3 "2018-03-22T10:52:39Z")

</div>

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