# Ho to aggregate multi lines in one

**URL:** https://discuss.elastic.co/t/ho-to-aggregate-multi-lines-in-one/47204
**Category:** Logstash
**Created:** [April 13, 2016, 7:36am UTC](https://discuss.elastic.co/t/ho-to-aggregate-multi-lines-in-one/47204 "2016-04-13T07:36:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Neal\_Shan](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Neal\_Shan](https://discuss.elastic.co/u/Neal_Shan)
#### Post date: [April 13, 2016, 7:36am UTC](https://discuss.elastic.co/t/ho-to-aggregate-multi-lines-in-one/47204/1 "2016-04-13T07:36:30Z")

</div>

> store type  
> 1 1  
> 1 2  
> 2 1  
> 2 3

group by type, output  
1 1,2  
2 1  
3 2

how to use a filter do this in logstash.  
please help!

---

<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:02am UTC](https://discuss.elastic.co/t/ho-to-aggregate-multi-lines-in-one/47204/2 "2017-07-06T05:02:32Z")

</div>


