Dictionary Action Builder

Text to Dictionary Conversion Tool for Shortcut Developers


Description

This shortcut helps you create complex dictionary actions in Shortcuts. You can write and test dictionaries in JSON-style text (e.g. {"name":"bong","happy":true}) and later use this tool to convert them to native actions, avoiding painful steps in building multi-level actions manually.

Arrays (e.g. ["hello", "world"]) can also be converted to list actions. It can convert multiple objects (e.g. {} [2, 3] {"say":"hi"}) at once, and accepts (text, json, pdf, etc) files or text selection through a share sheet or file picker, or copied text in the clipboard.

“Dictionaries and lists in text form are easier to read and edit. Why convert to native actions?”

  1. Native actions look cool :) but are hard to navigate and edit. Sometimes you would like to have native actions instead of messy text actions when you share your works with others. With this tool, you can continue using text dictionaries throughout your developing and testing phases.

  2. Dictionaries in text form do not retain the order of the key/value pairs when run. This is a pain when the order is important, for example, if you want to iterate through the keys or values in a specific order. This tool preserves the order.

  3. This tool is probably the only way to create lists with multiple-type items such as numbers, booleans, and even arrays and dictionaries (e.g. ["text", -2.3, false, {"a":"b"}]). 1. Please be aware that, if there is a list on the top level, your shortcut will crash when run.

  4. Generated actions can be combined with an existing shortcut or saved as a new shortcut.

UpdateHub


Latest Release Notes

1.5 - Aug. 6, 2020, 9:47 p.m.

• Files containing multiple dictionaries or lists can now have the .json extension.
• Multi-type lists don't cause a crash as long as there are no top-level lists.
• Other small enhancements.


Past versions