# Json input and splitting

**URL:** <https://discuss.elastic.co/t/json-input-and-splitting/232677>\
**Category:** Logstash\
**Created:** [May 14, 2020, 3:23pm UTC](https://discuss.elastic.co/t/json-input-and-splitting/232677 "2020-05-14T15:23:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [May 14, 2020, 5:06pm UTC](https://discuss.elastic.co/t/json-input-and-splitting/232677/2 "2020-05-14T17:06:52Z")

</div>

If you have a working json codec then typically you do not need a json filter as well. However, unless you have complete JSON objects on each line a json codec will not work, you need a multiline codec.

If you want to consume the entire file as a single event then configure the multiline codec as described [here](https://discuss.elastic.co/t/parsing-array-of-json-objects-with-logstash-and-injesting-to-elastic/203197/2). Then use a json filter. Then you can split the arrays using filters like

```
split { field => "proximity" }

```

However, that will end up with events that have a proximity field, a visitLength field and a loyaltyRecords field. If that is not what you want then you will need to use ruby.

---

_[View the full topic](https://discuss.elastic.co/t/json-input-and-splitting/232677)._
