# How to create key value from Nested fields

**URL:** https://discuss.elastic.co/t/how-to-create-key-value-from-nested-fields/242084
**Category:** Logstash
**Created:** [July 21, 2020, 6:45pm UTC](https://discuss.elastic.co/t/how-to-create-key-value-from-nested-fields/242084 "2020-07-21T18:45:26Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)
#### Post date: [July 21, 2020, 7:16pm UTC](https://discuss.elastic.co/t/how-to-create-key-value-from-nested-fields/242084/4 "2020-07-21T19:16:01Z")

</div>

Do you really want this as one large semicolon separated string or do you want this:

> [@Split array with key+value fields to key: value - Follow up](https://discuss.elastic.co/t/split-array-with-key-value-fields-to-key-value-follow-up/240469):
>
> Hello, I am trying to convert this input { "request": { "time": "2020-04-30T07:32:13.997Z", "size": "0", "headers": [ { "key": "Correlation-Id", "value": "124f4cdf-6cd7-44ae-a8dc-2ecf2b187f42" }, { "key": "host", "value": "api.local.host" }, { "key": "x-forwarded-for", "value": "1.1.1.1" }, { "key": "x-forwarded-port", "value": "443" …

?

---

_[View the full topic](https://discuss.elastic.co/t/how-to-create-key-value-from-nested-fields/242084)._
