# \[APP\]\[Pro\] JSON Handler and Manipulator

**URL:** <https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317>\
**Category:** Apps\
**Tags:** app, tools, homey-pro\
**Created:** [July 21, 2022, 9:01am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317 "2022-07-21T09:01:57Z")\
**Posts on this page:** 20\
**Page:** 4

<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:** [July 1, 2023, 10:32am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/61 "2023-07-01T10:32:55Z")

</div>

> [@Icepick](#):
>
> What confused me a little is that with the regular logic cards the output can be still json (like the whole array)… I noticed with your json handler it’s the actual field that needs to be the output (at least it seems that way).

Yeah, i can fix that! Would you mind creating a feature ticket for it? (Iink in the top post).  
Thanks!

---

<div class="post-metadata">

**Author:** ![Icepick](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/icepick/32/56463_2.png) [@Icepick](https://community.homey.app/u/Icepick)\
**Post date:** [July 1, 2023, 10:38am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/62 "2023-07-01T10:38:55Z")

</div>

I did! Not sure if it’s a feature that would be handy for everyone… but just think about it 🙂

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [October 23, 2023, 4:48am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/63 "2023-10-23T04:48:24Z")

</div>

Newbee JSON Handler Q

I have simple myJSON: {“29”:123,“30”:456"Year":23,“Month”:10,“Day”:23} and would like to read value of “30” (i.e. 456) (and as/if possible) also “Day” (i.e. 23)

What are correct variables in “Read JSON” card (have tried all but getting error after error)…

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [October 23, 2023, 6:20am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/64 "2023-10-23T06:20:56Z")

</div>

You are missing a “,” between “30”:456 and “Year”:. Maybe just a misspelling here?  
Property path 1 = “30”  
Property path 2 = “Day”

Value 1 and 2 is a number.

Does this not work?

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [October 23, 2023, 7:43am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/65 "2023-10-23T07:43:54Z")

</div>

Yes, actual JSON much longer, so saved some space and mistakenly “,” dropped.

JSON now directly on JSON Handler card (one value version):

myJSON: {“29”:123,“30”:456,“Year”:23,“Month”:10,“Day”:23}

Test 1: “Prop. path 1” (empty), **“Prop. path Number 1” (“30”)**, “…Yes/No 1” (empty)  
=\> Text-1 (empty), **Number-1 (zero)**, Yes/No 1 (No)

Test 2: **“Prop. path 1” (“30”)**, “Prop. path Number 1” (empty), "…Yes/No (empty)  
=\> Text-1 (empty), **Number-1 (zero)**, Yes/No 1 (No)

On HomeyScript below working just fine, but want to do small repeating things on flow-cards…

> console.log(myJSON[“30”])

newbee getting desparate 😬

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [October 23, 2023, 9:01am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/66 "2023-10-23T09:01:52Z")

</div>

Why not use the built-in Logic card to handle JSON?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/b/6bc24a50a52c4196d4a695547bca739c62ab652d.png)

(replace the “Start value” tag with the one that’s relevant for your situation)

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [October 23, 2023, 9:33am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/67 "2023-10-23T09:33:40Z")

</div>

Worked, thank you - now newbee happy.

> Why not use the built-in Logic card to handle JSON?

=\> did not realize simple card from Logic but also have to admit that would have not understood to use special characters eather…

Funny how long it took to try myself to find solution, can tell you that was more that 5h used here 🙂 , Thanks again

---

<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:** [October 23, 2023, 11:38am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/68 "2023-10-23T11:38:13Z")

</div>

You can use the same path in the Json Handler app.

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [October 23, 2023, 1:07pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/69 "2023-10-23T13:07:53Z")

</div>

Both JSON Handler resulst zero, while Logic with value…

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c71e47191c20ce11f614e606be9e93ee399d5239.png)

---

<div class="post-metadata">

**Author:** ![Antohagg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/antohagg/32/48013_2.png) [@Antohagg](https://community.homey.app/u/Antohagg)\
**Post date:** [November 17, 2023, 11:43pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/70 "2023-11-17T23:43:22Z")

</div>

I want to use this api [Strømpris API - Åpent og gratis](https://www.hvakosterstrommen.no/strompris-api) to check if the current hour has the lowest power price. Any suggestions how and where to start?

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [December 9, 2023, 12:46pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/71 "2023-12-09T12:46:54Z")

</div>

Is there a way to append to an array with JSON Handler?

```auto
{
  "frames":[...]
}

```

Basically I am looking at adding elements in sequence to the frames array json strings that I have built in previous flow steps as `{"icon":"57197","text":"20 °C","duration":500}`

so in the end I should have

```auto
{
  "frames":[
    {"icon":"57197","text":"20 °C","duration":500},
    {"icon":"48963","text":"36 °C","duration":500},
    ...
  ]
}

```

---

<div class="post-metadata">

**Author:** ![janrikard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/janrikard/32/34785_2.png) [@janrikard](https://community.homey.app/u/janrikard)\
**Post date:** [December 11, 2023, 10:51am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/72 "2023-12-11T10:51:33Z")

</div>

Hi,

It looks like your are doing somethings with lametric

Take a look att [https://homey.app/sv-se/app/dev.dadda.localapi/Local-API/](https://homey.app/sv-se/app/dev.dadda.localapi/Local-API/)  
Im trying to convince the author to make the output lametric-compatible.

/Rikard

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [December 11, 2023, 3:31pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/73 "2023-12-11T15:31:00Z")

</div>

True, using MQTT on LaMetric Time and the json used in the mqtt topic uses such an array for the information frames.

---

<div class="post-metadata">

**Author:** ![janrikard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/janrikard/32/34785_2.png) [@janrikard](https://community.homey.app/u/janrikard)\
**Post date:** [December 13, 2023, 7:15am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/74 "2023-12-13T07:15:08Z")

</div>

If i get the author of the local api app to mae it 100% compatible with lamterics json-format it will be easy to just use My Data DIY on the lametric.

Its already possible, but it takes a little bit to much configuration in the lamteric-app to be plesant, if i get the change in local api all programming can be done in homey

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [December 13, 2023, 7:50am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/75 "2023-12-13T07:50:27Z")

</div>

Just saw Athoms advertise that LaMetric is official supported. Is it not sufficient?  
What is missing?

---

<div class="post-metadata">

**Author:** ![janrikard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/janrikard/32/34785_2.png) [@janrikard](https://community.homey.app/u/janrikard)\
**Post date:** [December 13, 2023, 8:42am UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/76 "2023-12-13T08:42:15Z")

</div>

the lametricapps on homey gives you a little bit of controll of your lametric in general.  
But its possible in several diffrent ways to present information on your lametric, but the lametric-apps on homey doesnt supporrt that at all.  
and that sucks because if you use your homey you probably have a lot of data and information you would like to show on some sort of screen.

the homey app “local api” works, but needs a little bit of tweaking to be 100% compatible with one of the ways you could present information on lametric.  
mqtt maybe work, but i have never tried that

---

<div class="post-metadata">

**Author:** ![ChrisBoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chrisboer/32/1252_2.png) [@ChrisBoer](https://community.homey.app/u/ChrisBoer)\
**Post date:** [February 3, 2024, 2:10pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/77 "2024-02-03T14:10:34Z")

</div>

Question I got this json

[  
{“key”:“SN1”,“value”:“119706”,“unit”:null,“name”:“SN”},  
{“key”:“DV1”,“value”:“366.6”,“unit”:“V”,“name”:“DC Voltage PV1”},  
{“key”:“DV2”,“value”:“290.8”,“unit”:“V”,“name”:“DC Voltage PV2”},  
{“key”:“DC1”,“value”:“1.6”,“unit”:“A”,“name”:“DC Current PV1”},  
{“key”:“DC2”,“value”:“1.5”,“unit”:“A”,“name”:“DC Current PV2”},  
{“key”:“AV1”,“value”:“240.4”,“unit”:“V”,“name”:“AC Voltage R/U/A”},  
{“key”:“AV2”,“value”:“0.0”,“unit”:“V”,“name”:“AC Voltage S/V/B”},  
{“key”:“AV3”,“value”:“0.0”,“unit”:“V”,“name”:“AC Voltage T/W/C”},  
{“key”:“AC1”,“value”:“4.1”,“unit”:“A”,“name”:“AC Current R/U/A”},  
{“key”:“AC2”,“value”:“0.0”,“unit”:“A”,“name”:“AC Current S/V/B”},  
{“key”:“AC3”,“value”:“0.0”,“unit”:“A”,“name”:“AC Current T/W/C”},  
{“key”:“A\_Fo1”,“value”:“49.98”,“unit”:“Hz”,“name”:“AC Output Frequency R”},  
{“key”:“AP1”,“value”:“999”,“unit”:“W”,“name”:“AC Power R/U/A”},  
{“key”:“AP2”,“value”:“0”,“unit”:“W”,“name”:“AC Power S/V/B”},  
{“key”:“AP3”,“value”:“0”,“unit”:“W”,“name”:“AC Power T/W/C”},  
{“key”:“APo\_t1”,“value”:“999”,“unit”:“W”,“name”:“Total AC Output Power (Active)”},  
{“key”:“Et\_ge0”,“value”:“31663”,“unit”:“kWh”,“name”:“Cumulative Production (Active)”},  
{“key”:“Etdy\_ge1”,“value”:“3.77”,“unit”:“kWh”,“name”:“Daily Production (Active)”},  
{“key”:“INV\_T0”,“value”:“40.4”,“unit”:“℃”,“name”:“Temperature- Inverter”},  
{“key”:“t\_w\_hou1”,“value”:“0”,“unit”:“h”,“name”:“Total Running Hour”},  
{“key”:“INV\_ST1”,“value”:“6”,“unit”:null,“name”:“Inverter status”}]

Now I would like to store the Etdy\_ge1 to the homey pro numeric variable DailyProduction

But I can not get it to work

---

<div class="post-metadata">

**Author:** ![Amersfoort](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Amersfoort](https://community.homey.app/u/Amersfoort)\
**Post date:** [March 24, 2024, 1:41pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/78 "2024-03-24T13:41:15Z")

</div>

In javascript there is a possibiliy to stop/exit a loop before ending. How can I cancel an already running JSON Handler loop card?

---

<div class="post-metadata">

**Author:** ![mroek](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mroek/32/38044_2.png) [@mroek](https://community.homey.app/u/mroek)\
**Post date:** [April 8, 2024, 5:57pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/79 "2024-04-08T17:57:02Z")

</div>

I think there is something wrong with this app. I’ve been trying to parse a very simple JSON, but I just can’t make it work. I then went ahead and tried using the app to build an even simpler JSON (but similar), which also fails:

Assume that the simplified JSON I have looks like this:

{  
“Total volume”:234.567  
}

No matter what I try, the output number returned is 0. Here’s what the flow I tested with looks like:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/4/b4b2ef152fd7a85bfe5cb17ed62078b93aa65059.png)

This flow generates the exact JSON as shown above, but the given result (tag #Number 1) is always 0.

If I pass that same generated JSON to one of the builtin logic JSON parse flowcards, it provides the correct result. I am in fact using the builtin flowcards now, but it seemed an improvement to parse all the values in one card instead of multiple, but alas, this doesn’t seem to work.

---

<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:** [April 8, 2024, 6:25pm UTC](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/80 "2024-04-08T18:25:09Z")

</div>

Place a dollar and dot before the bracket: `$.`

Edit: wrongly answered, see answer:

> [@\[APP\]\[Pro\] JSON Handler and Manipulator](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317/87):
>
> Okay, update to version 1.2.9 and its resolved. What already would have resolved is, was placing a $ in front of the bracket, without the dot (my bad). By default, the $. was placed in front of it, if a user didn’t do that. That caused the “bug”. But i have changed it to include only a $ if it starts with a bracket. Also, i have created a small script to see if only one property name is entered and if it contains non-ascii - non-word characters, and if so, place it within brackets. This me…

[Previous page](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317.md?page=3)

[Next page](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317.md?page=5)
