# Map nested fields of object from Logstash to Elasticsearch (Kibana Forum)

**URL:** https://discuss.elastic.co/t/map-nested-fields-of-object-from-logstash-to-elasticsearch-kibana-forum/163983
**Category:** Kibana
**Created:** [January 12, 2019, 7:28am UTC](https://discuss.elastic.co/t/map-nested-fields-of-object-from-logstash-to-elasticsearch-kibana-forum/163983 "2019-01-12T07:28:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kejsi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kejsi/32/39670_2.png) [@kejsi](https://discuss.elastic.co/u/kejsi)
#### Post date: [January 12, 2019, 7:28am UTC](https://discuss.elastic.co/t/map-nested-fields-of-object-from-logstash-to-elasticsearch-kibana-forum/163983/1 "2019-01-12T07:28:18Z")

</div>

> <https://stackoverflow.com/questions/54142349/map-nested-fields-of-object-from-logstash-to-elasticsearch>

Guys hello 🙂  
I posted this on ES forum and they told me to get in here for best results!!

I have an object which looks like this:

```auto
"dummyObj":"{"id":6,"nrs":[1,2,3,4]}"

```

I supply this object from Log4j2 using JsonLayout. Moreover, I have created an index in Elasticsearch like this:

```auto
{
"mappings": {
        "dummy": {
                "properties": { 
                        "parsedDummyObj": {
                            "type": "nested",
                            "properties": {
                                "id": { "type": "text" },
                                "numbers": { "type": "text" }
                            }
                        }
                }                                                                                          
        }
}
}

```

Now, in Logstash I do this:

```auto
filter {

  json {
        source => "dummyObj"
        target => "parsedDummyObj"
        remove_field=>["dummyObj"]
    }
}

```

However, I get the error: **object mapping [parsedDummyObj] can't be changed from nested to non-nested"**

My question is: what type of filter/mapping should I use, for the json (dummyObj), to be added successfully in Elasticsearch?

PS: I have researched, and I know the answer may implicitly exist out there, but I am extremely too knew to Elastic and hope for your understanding.

---

<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: [February 9, 2019, 7:28am UTC](https://discuss.elastic.co/t/map-nested-fields-of-object-from-logstash-to-elasticsearch-kibana-forum/163983/2 "2019-02-09T07:28:21Z")

</div>

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