# Field with duplicate values, keep only one

**URL:** <https://discuss.elastic.co/t/field-with-duplicate-values-keep-only-one/207709>\
**Category:** Logstash\
**Created:** [November 13, 2019, 1:11pm UTC](https://discuss.elastic.co/t/field-with-duplicate-values-keep-only-one/207709 "2019-11-13T13:11:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor.nilsson](https://avatars.discourse-cdn.com/v4/letter/v/eb8c5e/32.png) [@victor.nilsson](https://discuss.elastic.co/u/victor.nilsson)\
**Post date:** [November 13, 2019, 1:11pm UTC](https://discuss.elastic.co/t/field-with-duplicate-values-keep-only-one/207709/1 "2019-11-13T13:11:50Z")

</div>

Hi,

We're parsing logs with the GROK filter and have set the option "brean\_on\_match" to false. This allows us to be absolutely sure that we don't miss a field but at the same time allows for multiple matches in a single message. That will then result in duplicate values for certain fields, for example:

`SrcIP: 192.168.1.234, 192.168.1.234`

Is there a way we can check if there are multiple values in a field and only keep the first one?

---

<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:** [December 11, 2019, 1:11pm UTC](https://discuss.elastic.co/t/field-with-duplicate-values-keep-only-one/207709/2 "2019-12-11T13:11:57Z")

</div>

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