# Logstash - based on filed type create a new field

**URL:** https://discuss.elastic.co/t/logstash-based-on-filed-type-create-a-new-field/283684
**Category:** Logstash
**Tags:** docker
**Created:** [September 8, 2021, 2:53pm UTC](https://discuss.elastic.co/t/logstash-based-on-filed-type-create-a-new-field/283684 "2021-09-08T14:53:04Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [September 8, 2021, 8:44pm UTC](https://discuss.elastic.co/t/logstash-based-on-filed-type-create-a-new-field/283684/3 "2021-09-08T20:44:49Z")

</div>

The difference between those two is that in one the [value] field is text ("10.130.138.12") and in the other it is an object. See [here](https://discuss.elastic.co/t/problem-logstash-outputs-elasticsearch-could-not-index-event-to-elasticsearch-wazuh-alerts-3-x-2020-05-30/235038/6) for one of the many threads about this.

Decide which you want it to be (string or object) and modify your events where it has the wrong type accordingly.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-based-on-filed-type-create-a-new-field/283684)._
