# Rename a field

**URL:** <https://discuss.elastic.co/t/rename-a-field/336901>\
**Category:** Elasticsearch\
**Created:** [June 26, 2023, 12:11pm UTC](https://discuss.elastic.co/t/rename-a-field/336901 "2023-06-26T12:11:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rihab1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rihab1/32/122537_2.png) [@Rihab1](https://discuss.elastic.co/u/Rihab1)\
**Post date:** [June 26, 2023, 12:11pm UTC](https://discuss.elastic.co/t/rename-a-field/336901/1 "2023-06-26T12:11:15Z")

</div>

Hello,  
I want to rename a field which is the result of **static filter**. it contains many values, I used "Rename" but it didn't work.  
The field current name is: previous.employeeid

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c4c9d745b2d6cee380cc6f2fbce9a086960f2155.png)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [June 26, 2023, 12:24pm UTC](https://discuss.elastic.co/t/rename-a-field/336901/2 "2023-06-26T12:24:14Z")

</div>

Hello,

You need to provide more context, share an example of how your document looks like.

Also, if the field `previous.employeeid` is a json object, with `employeeid` being nested under `previous`, in this way:

```auto
{ "previous": { "employeeid": "values" } }

```

Then, the correct way to make reference to this field in Logstash is using `[previous][employeeid]`.

---

<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:** [July 24, 2023, 12:25pm UTC](https://discuss.elastic.co/t/rename-a-field/336901/3 "2023-07-24T12:25:13Z")

</div>

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