# Mutate object field

**URL:** <https://discuss.elastic.co/t/mutate-object-field/207356>\
**Category:** Logstash\
**Created:** [November 11, 2019, 1:33pm UTC](https://discuss.elastic.co/t/mutate-object-field/207356 "2019-11-11T13:33:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrisKarrots](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kriskarrots/32/46843_2.png) [@KrisKarrots](https://discuss.elastic.co/u/KrisKarrots)\
**Post date:** [November 11, 2019, 1:33pm UTC](https://discuss.elastic.co/t/mutate-object-field/207356/1 "2019-11-11T13:33:14Z")

</div>

Hello,

I am trying to mutate an object field (JSON object) using the add\_field to rename it, after this has been applied, the new field looks like this

`{message=1},{message=2},{message=3},{message=4}` - in one line

Pre-mutation the field looked like this  
{  
"message": "1"  
}  
{  
"message": "2"  
}  
{  
"message": "3"  
}  
{  
"message": "4"  
}

How can I keep the format the same as the one in the original field?

The field initially is presented in kibana as "?" after mutate applies it is converted to "t" for text, which may be the cause of this format change?

Thank you!

---

<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 9, 2019, 1:33pm UTC](https://discuss.elastic.co/t/mutate-object-field/207356/2 "2019-12-09T13:33:19Z")

</div>

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