Parsing out Openweather data


#1

1) Give a description of the problem

I’m playing with Openweather $responses, and have learned a lot. For example, I used rangeValue to turn degrees into compass directions (rangeValue({$response.current.wind_deg}, ‘N’, 33, ‘NW’, 78, ‘E’, 123, ‘SE’, 168, ‘S’, 213, ‘SW’,258, ‘W’, 303, ‘NW’, 348, ‘N’))

However, when trying to do this for daily moon phases, I get several days of info. Same with DailyPop (Probability of precipitation). I’d like to parse out just today’s info for both of these.

(It also kinda sucks that OW has brackets in some of their $responses, since they screw with my piston states.

**4) Post a Green Snapshot of the piston![image|45x37]


#2

Try adding [0] at the end of your query to only grab the first dataPoint.


#3

That did it. Just out of curiosity, would [1] grab the second, [2] the third, and so on?


#4

You guessed it. :sunglasses: