# JSON post and parsing help

**URL:** <https://community.homey.app/t/json-post-and-parsing-help/79570>\
**Category:** Flows\
**Created:** [April 21, 2023, 2:54pm UTC](https://community.homey.app/t/json-post-and-parsing-help/79570 "2023-04-21T14:54:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kjettern](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kjettern/32/9184_2.png) [@Kjettern](https://community.homey.app/u/Kjettern)\
**Post date:** [April 21, 2023, 2:54pm UTC](https://community.homey.app/t/json-post-and-parsing-help/79570/1 "2023-04-21T14:54:27Z")

</div>

Hello. I’m trying to get values from a JSON to be parsed into values for use in Homey, but I really can’t get it to work. I’m no coder, but I’ve managed to get the code to be read in a post call.  
When I try to read the value “name” in the JSON I get an error. Can anyone spot what’s wrong and point me in the right direction of how to solve this?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/c/5c9d8567f8937fee642fe63e4abbe9183d90a61f.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/d/2d348cc7dfc39821ca4e017a5d817a68a0f43d8a.png)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [April 21, 2023, 3:08pm UTC](https://community.homey.app/t/json-post-and-parsing-help/79570/2 "2023-04-21T15:08:19Z")

</div>

There are several stackes structures and an array inside.  
You have to write the path following the IDs like  
data.stopPlace.name

But there is another “name” in the JSON that’s much deeper in the structures/array. Which one do you need?

---

<div class="post-metadata">

**Author:** ![Kjettern](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kjettern/32/9184_2.png) [@Kjettern](https://community.homey.app/u/Kjettern)\
**Post date:** [April 21, 2023, 3:47pm UTC](https://community.homey.app/t/json-post-and-parsing-help/79570/3 "2023-04-21T15:47:19Z")

</div>

Actually I need the expectedDepartureTime. Name was just to test out something easy in the beginning 😊

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [April 21, 2023, 4:30pm UTC](https://community.homey.app/t/json-post-and-parsing-help/79570/4 "2023-04-21T16:30:23Z")

</div>

It’s hard to read in this unformatted string on a mobile phone.  
Let me try…

data.stopPlace.estimatesCalls[0].expectedDepartureTime

If the array startes with [has more than one entry of {…}, you can access the second one with estimatedCalls[1] and so on.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 21, 2023, 9:09pm UTC](https://community.homey.app/t/json-post-and-parsing-help/79570/5 "2023-04-21T21:09:36Z")

</div>

I think you can play with / test it here, to see what does what

> **[JSONPath Online Evaluator](https://jsonpath.com/)**
>
> JSONPath Online Evaluator

---

<div class="post-metadata">

**Author:** ![Lukeg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lukeg/32/85891_2.png) [@Lukeg](https://community.homey.app/u/Lukeg)\
**Post date:** [June 17, 2024, 1:08pm UTC](https://community.homey.app/t/json-post-and-parsing-help/79570/6 "2024-06-17T13:08:56Z")

</div>

> **[JSON Path Finder](https://jsonpathfinder.com/)**
>
> JSON Path Finder

this one has a “Minify” button that helps you find the correct path.
