# Ruby filter loop through fields in logstash 5?

**URL:** <https://discuss.elastic.co/t/ruby-filter-loop-through-fields-in-logstash-5/72026>\
**Category:** Logstash\
**Created:** [January 18, 2017, 2:39pm UTC](https://discuss.elastic.co/t/ruby-filter-loop-through-fields-in-logstash-5/72026 "2017-01-18T14:39:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Clem\_Bac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clem_bac/32/14403_2.png) [@Clem\_Bac](https://discuss.elastic.co/u/Clem_Bac)\
**Post date:** [January 20, 2017, 12:46pm UTC](https://discuss.elastic.co/t/ruby-filter-loop-through-fields-in-logstash-5/72026/2 "2017-01-20T12:46:00Z")

</div>

[quote="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 ?

---

_[View the full topic](https://discuss.elastic.co/t/ruby-filter-loop-through-fields-in-logstash-5/72026)._
