# How can I remove dot from nested object in logstash

**URL:** <https://discuss.elastic.co/t/how-can-i-remove-dot-from-nested-object-in-logstash/228159>\
**Category:** Logstash\
**Created:** [April 15, 2020, 3:47pm UTC](https://discuss.elastic.co/t/how-can-i-remove-dot-from-nested-object-in-logstash/228159 "2020-04-15T15:47:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![esfandani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esfandani/32/66376_2.png) [@esfandani](https://discuss.elastic.co/u/esfandani)\
**Post date:** [April 15, 2020, 3:47pm UTC](https://discuss.elastic.co/t/how-can-i-remove-dot-from-nested-object-in-logstash/228159/1 "2020-04-15T15:47:20Z")

</div>

what goes to elasticsearch is something like this:

```
  {
    "result": "https://www.yahoo.com",
    "tags": {
      "url": "https://www.yahoo.com",
      "projectName": "monitor",
      "host": "ttt",
      "dd": 12345,
      "vv": "kk"
    },
    "timestamp": 1586599441000,
    "runId": 12345,
    "performance": {
      "x.y.z": 31307
    
    },
    "channel": "clientperf",
    "asset": {
      "a.b.c": 5,
     "a.b":4
    }
  }

```

as you see values inside asset and performance has dot and we don't have access to the original source to change. Also as you can see we can have both values **a.b.c** and **a.b** which makes problem in mapping. How can I resolve this either with replacing the dot in logstash or anything that doesn't give me error _Object mapping for [x] tried to parse field [x.y] as object, but found a concrete value_

---

<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:** [April 15, 2020, 5:42pm UTC](https://discuss.elastic.co/t/how-can-i-remove-dot-from-nested-object-in-logstash/228159/2 "2020-04-15T17:42:43Z")

</div>

You could use mutate+rename to rename those fields so that they do not contain periods.

---

<div class="post-metadata">

**Author:** ![esfandani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esfandani/32/66376_2.png) [@esfandani](https://discuss.elastic.co/u/esfandani)\
**Post date:** [April 20, 2020, 3:50am UTC](https://discuss.elastic.co/t/how-can-i-remove-dot-from-nested-object-in-logstash/228159/3 "2020-04-20T03:50:21Z")

</div>

@Badger The fields have dynamic naming and are nested. can you let me know how do you do that for the example that I provided? (the filter part of logstash config. )

---

<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:** [May 18, 2020, 3:50am UTC](https://discuss.elastic.co/t/how-can-i-remove-dot-from-nested-object-in-logstash/228159/4 "2020-05-18T03:50:27Z")

</div>

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