# Logstash split the child json to the parent layer

**URL:** <https://discuss.elastic.co/t/logstash-split-the-child-json-to-the-parent-layer/319339>\
**Category:** Logstash\
**Created:** [November 19, 2022, 6:23am UTC](https://discuss.elastic.co/t/logstash-split-the-child-json-to-the-parent-layer/319339 "2022-11-19T06:23:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lnsane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lnsane/32/108288_2.png) [@lnsane](https://discuss.elastic.co/u/lnsane)\
**Post date:** [November 19, 2022, 6:23am UTC](https://discuss.elastic.co/t/logstash-split-the-child-json-to-the-parent-layer/319339/1 "2022-11-19T06:23:16Z")

</div>

this is json

```json
{
    "@timestamp" => 2022-11-19T06:19:08.249Z,
      "database" => "12",
     "data": {
     "a": 1,
     "b": 2
}
}

```

how resolve to

```json
{
    "@timestamp" => 2022-11-19T06:19:08.249Z,
      "database" => "12",
     "a": 1,
     "b": 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:** [November 19, 2022, 3:32pm UTC](https://discuss.elastic.co/t/logstash-split-the-child-json-to-the-parent-layer/319339/2 "2022-11-19T15:32:14Z")

</div>

You could use something like the last ruby filter in [this](https://discuss.elastic.co/t/split-http-poller-responses-to-multiple-documents-using-split-filter/318418/3) post.

---

<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:** [December 17, 2022, 3:32pm UTC](https://discuss.elastic.co/t/logstash-split-the-child-json-to-the-parent-layer/319339/3 "2022-12-17T15:32:37Z")

</div>

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