# Map string value of an ID to a custom String using JSON input

**URL:** <https://discuss.elastic.co/t/map-string-value-of-an-id-to-a-custom-string-using-json-input/258491>\
**Category:** Kibana\
**Created:** [December 12, 2020, 6:59pm UTC](https://discuss.elastic.co/t/map-string-value-of-an-id-to-a-custom-string-using-json-input/258491 "2020-12-12T18:59:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![officer\_snickers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/officer_snickers/32/80755_2.png) [@officer\_snickers](https://discuss.elastic.co/u/officer_snickers)\
**Post date:** [December 12, 2020, 6:59pm UTC](https://discuss.elastic.co/t/map-string-value-of-an-id-to-a-custom-string-using-json-input/258491/1 "2020-12-12T18:59:50Z")

</div>

I'm totally new to kibana.

I have the current problem, I created a visualisation chart which is splitting rows based on the UUID. In this Index, I unfortunately don't have the related organisation name to the UUID.

My question now is can I map the UUIDs to a specific String value using "advanced JSON input"? So i see the organisation names instead of the UUIDs.

Eg.  
if organisation\_uuid == "1001" {  
organisation\_uuid = "Organisation 1"  
} else if organisation\_uuid == "1002" {  
organisation\_uuid = "Organisation 2"  
} else if ...

Thank you in advance for helping a newbie 🙂

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [December 15, 2020, 3:18pm UTC](https://discuss.elastic.co/t/map-string-value-of-an-id-to-a-custom-string-using-json-input/258491/2 "2020-12-15T15:18:57Z")

</div>

hi @officer_snickers

this kind of transformation of one value to another (e.g. `1001` -\> `Organization 1`) is easiest to do with a scripted-field: [https://www.elastic.co/guide/en/kibana/current/scripted-fields.html](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) Basically, you would create a new scripted field that uses a little script to generate the value.

It's a feature of a Kibana index pattern. You would write a script in the painless-language that does this transformation. More details here [https://www.elastic.co/guide/en/elasticsearch/painless/7.10/painless-walkthrough.html](https://www.elastic.co/guide/en/elasticsearch/painless/7.10/painless-walkthrough.html)

---

<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:** [January 12, 2021, 3:19pm UTC](https://discuss.elastic.co/t/map-string-value-of-an-id-to-a-custom-string-using-json-input/258491/3 "2021-01-12T15:19:10Z")

</div>

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