I would love some help with parsing JSON feeds of webpages. While I have spent the past year or so becoming comfortable with Shortcuts, JSON is something new. I am starting to explore dictionaries (thanks to MacSparky’s Shortcuts Field Guide)
I have a requirement for work to check daily the previous days weather observations and see if the temperature was recorded above 35ºC. I could scroll through lines of weather observations, however was hoping Shortcuts could do that for me.
You can add a “Combine text with new lines” at the end if you want them all to be in one document.
Note that I searched for temperatures greater than 29 for testing, because there are currently none observed over 35. You can change that in the “if dictionary value is greater than 29” block.
The “format date” block didn’t understand the way the date is formatted in the source data, so I used some quick and dirty regex (search for 4 digits, then 2 digits, 2 digits, 2 digits, 2 digits, 2 digits) to format it before passing it into “format date”.