Prompt With JSON

To use a Keyboard Maestro variable containing a JSON dictionary as the source of a Prompt With List action, and choose a value by its key,

for example either:

fromKey

or

fromValue

Prompt from JSON dictionary.kmmacros (21.2 KB)
promptFromJSON

2 Likes

A more helpful example may be one in which the values retrieved from the dictionary are not displayed with the keys shown in the prompt:

Prompt from JSON dictionary (Example II).kmmacros (21.2 KB)
example2

blindChoice

SouthCarolina

2 Likes

Looks like there is an extra getvariable('jsonPromptResult') function in three of the four JXA codes that prevents the code from working properly.