# Having json objects as variable

**URL:** <https://community.homey.app/t/having-json-objects-as-variable/74797>\
**Category:** Ideas & Suggestions\
**Created:** [January 9, 2023, 9:07am UTC](https://community.homey.app/t/having-json-objects-as-variable/74797 "2023-01-09T09:07:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mackelito](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mackelito/32/8243_2.png) [@Mackelito](https://community.homey.app/u/Mackelito)\
**Post date:** [January 9, 2023, 9:07am UTC](https://community.homey.app/t/having-json-objects-as-variable/74797/1 "2023-01-09T09:07:10Z")

</div>

I would like to have a translation between my heaters error codes (IVT Greenline HE 11).

Usage:  
if the notification value from the heater is x then I want to convert it to a string so that I can get a better understanding of what happened.

```auto
{
0: 'Error restored',
1: 'Overheated',
2: 'Temperature archived'
}

```

And then use this for mapping

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [January 9, 2023, 11:20am UTC](https://community.homey.app/t/having-json-objects-as-variable/74797/2 "2023-01-09T11:20:11Z")

</div>

Perhaps you can use the JSON Handler app:

> **[JSON Handler](https://homey.app/nl-nl/app/nl.qluster-it.JsonHandler/JSON-Handler/)**
>
> JSON handler and manipulator

---

<div class="post-metadata">

**Author:** ![Mackelito](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mackelito/32/8243_2.png) [@Mackelito](https://community.homey.app/u/Mackelito)\
**Post date:** [January 15, 2023, 9:30pm UTC](https://community.homey.app/t/having-json-objects-as-variable/74797/3 "2023-01-15T21:30:24Z")

</div>

Found it quite hard understanding that app…  
Solved it using HomeyScript mapping a object and then passing as a test tag… 🙂
