# How to save array of nested type using Logstash?

**URL:** <https://discuss.elastic.co/t/how-to-save-array-of-nested-type-using-logstash/136677>\
**Category:** Logstash\
**Created:** [June 20, 2018, 11:35am UTC](https://discuss.elastic.co/t/how-to-save-array-of-nested-type-using-logstash/136677 "2018-06-20T11:35:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevefai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevefai/32/31039_2.png) [@stevefai](https://discuss.elastic.co/u/stevefai)\
**Post date:** [June 20, 2018, 11:35am UTC](https://discuss.elastic.co/t/how-to-save-array-of-nested-type-using-logstash/136677/1 "2018-06-20T11:35:06Z")

</div>

I store an array of stacktrace rows containing multiple fields, but can't seem to make the objects as nested type.

The array looks like this and is returned by a custom ruby filter that I made:

[  
{  
"name": "name1",  
"message": "message1"  
},  
{  
"name": "name2",  
"message": "message2"  
},  
{  
"name": "name3",  
"message": "message3"  
}  
]

I currently just use event.set("array-field-name", array-values) but it isn't saved as nested type in ElasticSearch

---

<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 18, 2018, 11:42am UTC](https://discuss.elastic.co/t/how-to-save-array-of-nested-type-using-logstash/136677/2 "2018-07-18T11:42:01Z")

</div>

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