# Convert single value array in "\_source" to single value in "stored\_fields"

**URL:** <https://discuss.elastic.co/t/convert-single-value-array-in-source-to-single-value-in-stored-fields/205534>\
**Category:** Elasticsearch\
**Created:** [October 28, 2019, 6:30pm UTC](https://discuss.elastic.co/t/convert-single-value-array-in-source-to-single-value-in-stored-fields/205534 "2019-10-28T18:30:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EricPSU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericpsu/32/21110_2.png) [@EricPSU](https://discuss.elastic.co/u/EricPSU)\
**Post date:** [October 28, 2019, 6:30pm UTC](https://discuss.elastic.co/t/convert-single-value-array-in-source-to-single-value-in-stored-fields/205534/1 "2019-10-28T18:30:30Z")

</div>

I have data that will always be single value, but it is being sent to my Elasticsearch 5.6 instance as an array. I do not have control over how the data is being sent or the version of Elasticsearch. I do have control over how the properties are mapped in my index.

Is there a way for me to utilize an index property mapping to convert the \_source value of `"firstName": ["Eric"]` to a stored\_fields value of `"firstName": "Eric"`?

---

<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:** [November 25, 2019, 6:39pm UTC](https://discuss.elastic.co/t/convert-single-value-array-in-source-to-single-value-in-stored-fields/205534/2 "2019-11-25T18:39:13Z")

</div>

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