# Is there a way to create nested structures in logstash?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-create-nested-structures-in-logstash/32509>\
**Category:** Logstash\
**Created:** [October 19, 2015, 4:34pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-create-nested-structures-in-logstash/32509 "2015-10-19T16:34:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlang](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dlang](https://discuss.elastic.co/u/dlang)\
**Post date:** [October 19, 2015, 4:34pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-create-nested-structures-in-logstash/32509/1 "2015-10-19T16:34:12Z")

</div>

For example, I want to have the output be something like:

```auto
{
  "trusted" : {
     "logstash": {
       "host": "some IP",
       "timereceived": "some timestamp"
    }
  }
}
```

does logstash follow the project lumberjack convention of allowing me to define names like trusted!logstash!host or something like that?

David Lang

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 19, 2015, 4:46pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-create-nested-structures-in-logstash/32509/2 "2015-10-19T16:46:26Z")

</div>

This should be helpful: [https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#logstash-config-field-references)

---

<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:** [July 6, 2017, 5:26am UTC](https://discuss.elastic.co/t/is-there-a-way-to-create-nested-structures-in-logstash/32509/3 "2017-07-06T05:26:09Z")

</div>

Closed on July 6, 2017, 5:26am UTC


