JSON post and parsing help

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

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?

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

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.

1 Like

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

1 Like

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