# Split array with different nested elemetnts

**URL:** <https://discuss.elastic.co/t/split-array-with-different-nested-elemetnts/297063>\
**Category:** Logstash\
**Created:** [February 12, 2022, 11:49pm UTC](https://discuss.elastic.co/t/split-array-with-different-nested-elemetnts/297063 "2022-02-12T23:49:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [February 14, 2022, 3:15am UTC](https://discuss.elastic.co/t/split-array-with-different-nested-elemetnts/297063/6 "2022-02-14T03:15:50Z")

</div>

See [this](https://discuss.elastic.co/t/getting-illegal-state-exception-error-while-pushing-logs-to-elasticsearch/290029/2) answer for a discussion of mapping exceptions and how to fix them

The error is pointing at `{"payload"=>"[{\"isHeadingHome\":0,`. The [payload] field is a string, and Elasticsearch expects it to be an object. Note that the event has a \_split\_type\_failure tag. It may OK that payloadJson is an object -- that's not causing an error.

---

_[View the full topic](https://discuss.elastic.co/t/split-array-with-different-nested-elemetnts/297063)._
