# Split the Field values by comma

**URL:** https://discuss.elastic.co/t/split-the-field-values-by-comma/315673
**Category:** Logstash
**Created:** [October 3, 2022, 9:38am UTC](https://discuss.elastic.co/t/split-the-field-values-by-comma/315673 "2022-10-03T09:38:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Maruthappan\_Muthu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maruthappan_muthu/32/100807_2.png) [@Maruthappan\_Muthu](https://discuss.elastic.co/u/Maruthappan_Muthu)
#### Post date: [October 3, 2022, 9:38am UTC](https://discuss.elastic.co/t/split-the-field-values-by-comma/315673/1 "2022-10-03T09:38:02Z")

</div>

My field contains multiple values, which separated by comma. How can I split the each comma separated values and put on the same filed name.

Ex.  
The consider the below field and values,  
SerialNumber =\> [abc23, cde56, mgf78]

I am looking to split them to,  
MySerialNymber =\> abc23,  
MySerialNymber =\> cde56  
MySerialNymber =\> mgf78

---

<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: [October 3, 2022, 4:06pm UTC](https://discuss.elastic.co/t/split-the-field-values-by-comma/315673/2 "2022-10-03T16:06:23Z")

</div>

For an event to have multiple values for a single field name the field has to be an array, you cannot have more than one field on an event with the same name.

If you have an array field and you want to split it into multiple events then you can use a [split](https://www.elastic.co/guide/en/logstash/current/plugins-filters-split.html) filter.

---

<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: [October 31, 2022, 4:06pm UTC](https://discuss.elastic.co/t/split-the-field-values-by-comma/315673/3 "2022-10-31T16:06:57Z")

</div>

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