Parse JSON data


I am trying to parse JSON data, I have reviewed a few posts, but I think they are “further” along than I am, I need to understand the “basics” of it first. The data is coming from a weather station (Weather Flow Tempest). They have an API that will give JSON data.

When I go to the URL of my API into a web browser, it returns the following:


I understand that I have to use the do Make a GET request to the URL. But I am just not sure of what I am supposed to do next and how to “use” any of the data that was received.

I know that this is asking a lot at this point because I have so little of an understanding of what to do next, but I think that if I could get pointed in the right direction, I might be able to figure the rest out. Any help is greatly appreciated.

Thank you in advance.


I haven’t done this for a long while, but as I recall, the response to your web request should appear in the $response variable and it is assumed to be in JSON format so you don’t have to do any specific conversion. So you should be able to access the results using e.g. $response.status.status_message, $response.obs[0][0] etc.


I concur, webCore does automatically parse JSON data into the $response variable accessible using an expression as mentioned above $response.status.status_message

I would only add that the $response variable is only valid during that one execution of the piston, it will read as null at all other times.

My general process is to set the variable first then proceed with any data processing.


Great. Thank you both. I will try playing around with this tonight when I am home!