# How can i put event json in an array

**URL:** https://discuss.elastic.co/t/how-can-i-put-event-json-in-an-array/127204
**Category:** Logstash
**Created:** [April 8, 2018, 10:28am UTC](https://discuss.elastic.co/t/how-can-i-put-event-json-in-an-array/127204 "2018-04-08T10:28:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sky](https://avatars.discourse-cdn.com/v4/letter/s/f4b2a3/32.png) [@sky](https://discuss.elastic.co/u/sky)
#### Post date: [April 8, 2018, 10:28am UTC](https://discuss.elastic.co/t/how-can-i-put-event-json-in-an-array/127204/1 "2018-04-08T10:28:30Z")

</div>

Hi,all！  
I need logstash to output the event json in array, example,  
{"field":"value"} to [{"field":"value"}] , how can i do?

thanks!

---

<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 8, 2018, 4:00pm UTC](https://discuss.elastic.co/t/how-can-i-put-event-json-in-an-array/127204/2 "2018-04-08T16:00:38Z")

</div>

If you have a message that contains {"field":"value"} then you can put it into an array using

```auto
mutate { merge => { "somearray" => "message" } }

```

---

<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 6, 2018, 4:00pm UTC](https://discuss.elastic.co/t/how-can-i-put-event-json-in-an-array/127204/3 "2018-05-06T16:00:54Z")

</div>

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