macOS
![](/https://help.apple.com/assets/6712D663A5C9C17B38070C34/6712D6680716C7F2C008E7B0/en_GB/fbd8d40651fff19a46e7aaedd4cb1b09.png)
Handling dictionaries using the Get Dictionary Value action in Shortcuts on Mac
To get the value for a particular key in a dictionary, you can use the Get Dictionary Value action and specify the name of the key. To get an object’s phone value, add the Get Dictionary Value action and set it to phone
.
![Get Dictionary Value action in the shortcut editor with the key set to phone.](/https://help.apple.com/assets/6712D663A5C9C17B38070C34/6712D6680716C7F2C008E7B0/en_GB/84bf1e7bdf6f8714dfd2b1740322d204.png)
If you want the company name, you can use the dot notation company.name
, as shown in the screenshot below.
![Get Dictionary Value action in the shortcut editor with the key set to company.name.](/https://help.apple.com/assets/6712D663A5C9C17B38070C34/6712D6680716C7F2C008E7B0/en_GB/0c7c53b3df4b7f9f23a78c6f87b1a252.png)
The latitude and longitude for each object is stored in address
as a dictionary called geo
, as shown in the screenshot below. Using dot notation, you can access data nested multiple levels deep in a dictionary.
![Get Dictionary Value action in the shortcut editor with the key set to address.geo.lat.](/https://help.apple.com/assets/6712D663A5C9C17B38070C34/6712D6680716C7F2C008E7B0/en_GB/2f8931e8b0211748d12f3760ed0472f9.png)
For information on working with multiple items in a dictionary, see Handling lists in Shortcuts on Mac.