# Convert dates in EJSON format / Access current processed field alias

**URL:** <https://discuss.elastic.co/t/convert-dates-in-ejson-format-access-current-processed-field-alias/311114>\
**Category:** Logstash\
**Created:** [August 1, 2022, 12:26pm UTC](https://discuss.elastic.co/t/convert-dates-in-ejson-format-access-current-processed-field-alias/311114 "2022-08-01T12:26:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas\_seres\_panda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_seres_panda/32/109105_2.png) [@thomas\_seres\_panda](https://discuss.elastic.co/u/thomas_seres_panda)\
**Post date:** [August 1, 2022, 12:26pm UTC](https://discuss.elastic.co/t/convert-dates-in-ejson-format-access-current-processed-field-alias/311114/1 "2022-08-01T12:26:39Z")

</div>

Hi !  
I would like to dynamically :

- match any fields corresponding to a format like "yyyy-MM-dd"
- add new field by using current processed field :  
example :  
` add_field => { "[%{current_processed_field_name}'_ejson'][$date]" => "%{current_processed_field_value}" }`

I need to do this to create a new field with a suffix to store dates as EJSON format.  
Is there a way (an alias ?) to get current processed field name & value ?

What do you suggest ?

Thank you in advance !

---

<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:** [August 30, 2022, 8:45am UTC](https://discuss.elastic.co/t/convert-dates-in-ejson-format-access-current-processed-field-alias/311114/3 "2022-08-30T08:45:19Z")

</div>

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