# How to iterate through several elements and create a new field with the content of each element

**URL:** https://discuss.elastic.co/t/how-to-iterate-through-several-elements-and-create-a-new-field-with-the-content-of-each-element/215656
**Category:** Logstash
**Created:** [January 20, 2020, 12:10am UTC](https://discuss.elastic.co/t/how-to-iterate-through-several-elements-and-create-a-new-field-with-the-content-of-each-element/215656 "2020-01-20T00:10:13Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [January 20, 2020, 3:25pm UTC](https://discuss.elastic.co/t/how-to-iterate-through-several-elements-and-create-a-new-field-with-the-content-of-each-element/215656/2 "2020-01-20T15:25:38Z")

</div>

You could try something similar to [this](https://discuss.elastic.co/t/parsing-an-array-in-ruby/121254/2).

---

_[View the full topic](https://discuss.elastic.co/t/how-to-iterate-through-several-elements-and-create-a-new-field-with-the-content-of-each-element/215656)._
