![](https://help.apple.com/assets/645D5D228BE0233D28263F4B/645D5D248BE0233D28263F53/en_AU/fbd8d40651fff19a46e7aaedd4cb1b09.png)
Parsing JSON in Shortcuts from an API request
If you look at the Typicode API response, you can see that there’s a lot of data stored in JSON. While it isn’t easy to read at first, over time you’ll start to recognise 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. Additionally, it’s helpful to check your work using services like the online JSON Editor.
![An example of JSON data.](https://help.apple.com/assets/645D5D228BE0233D28263F4B/645D5D248BE0233D28263F53/en_AU/dc6ab5c6bfb865d7f372a7b94a9b4b35.png)
Note that the Typicode API Response is a list. The list contains objects. The objects contain keys like ID
, name
, username
, address
and more. Some of these keys, such as phone
and name
, simply contain a number or text value, but others, such as company
, have a dictionary value.
The address
dictionary contains some keys with values that are simple text, such as street
, and other keys, such as geo
, which are themselves dictionaries containing multiple values (lat
and lng
).