# Move all fields to a subfield?

**URL:** <https://discuss.elastic.co/t/move-all-fields-to-a-subfield/225563>\
**Category:** Logstash\
**Created:** [March 29, 2020, 2:51pm UTC](https://discuss.elastic.co/t/move-all-fields-to-a-subfield/225563 "2020-03-29T14:51:52Z")\
**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:** [March 29, 2020, 3:31pm UTC](https://discuss.elastic.co/t/move-all-fields-to-a-subfield/225563/2 "2020-03-29T15:31:32Z")

</div>

Referring to the event as a hash was disabled years ago, you need to use the [event API](https://www.elastic.co/guide/en/logstash/current/event-api.html), like [this](https://discuss.elastic.co/t/how-to-dynamically-move-nested-key-value-to-root-level/180006/2).

---

_[View the full topic](https://discuss.elastic.co/t/move-all-fields-to-a-subfield/225563)._
