# Renaming fields dinamically

**URL:** <https://discuss.elastic.co/t/renaming-fields-dinamically/288237>\
**Category:** Logstash\
**Created:** [November 2, 2021, 3:16pm UTC](https://discuss.elastic.co/t/renaming-fields-dinamically/288237 "2021-11-02T15:16:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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 2, 2021, 4:10pm UTC](https://discuss.elastic.co/t/renaming-fields-dinamically/288237/4 "2021-11-02T16:10:41Z")

</div>

You would replace the contents of the .each loop with something like [this](https://discuss.elastic.co/t/how-to-remove-part-of-name-in-multiple-fields-with-ruby-in-logstash/254263/5).

---

_[View the full topic](https://discuss.elastic.co/t/renaming-fields-dinamically/288237)._
