![](https://help.apple.com/assets/5D38A6ED0946225A2D640948/5D38A6F70946225A2D640958/hu_HU/c10e8a839dc838a25d0feb0e9e428a0a.png)
Parsing JSON in Shortcuts from an API request
If you look at the Dark Sky API response, you can see that there’s a lot of data stored in JSON. While it’s not easy to read at first, over time you’ll start to recognize the structures in JSON data, as well as how to identify dictionaries, lists, keys, and values. Often, developers include a nicely formatted version of the JSON data that their API will return, so look for that in their documentation. Ezenfelül érdemes ellenőrizni a munkáját olyan szolgáltatásokkal, mint az online JSON-szerkesztő.
![Példa JSON-adatokra.](https://help.apple.com/assets/5D38A6ED0946225A2D640948/5D38A6F70946225A2D640958/hu_HU/4ef43f5eb3b06ebc0de1720a5d7a6e5a.png)
Notice that the top-level object is a dictionary with the keys latitude
, longitude
, timezone
, currently
, and minutely
. Some of these keys, such as latitude
and timezone
, simply contain a number or text value, but others, such as daily
, have a dictionary value.
And the daily
dictionary contains some keys with values that are simple text, such as the summary
, with Rain throughout the day
. Azonban az egyebek, például az adatok
olyan listák, amelyek előrejelzést (amelyet egy szótár jelöl) tartalmaznak minden órához.
![Egy kulcsokat és karakterláncokat tartalmazó szótár.](https://help.apple.com/assets/5D38A6ED0946225A2D640948/5D38A6F70946225A2D640958/hu_HU/e41b6ec98bb057348bc2719b5e2df2d1.png)