I'm Trying to Learn About JSON Objects and Hitting a Wall

I'm trying to learn about JSON objects and hitting a wall.

It looks pretty straightforward for mapping value pairs, but it wasn't behaving as I'd expected. So I created an example based on this write-up of JSONValue:

Keyboard Maestro Actions.kmactions (1.4 KB)

Keyboard Maestro Export

I expected this to show me the word "bravo" (without quote marks) in the display field, but no luck. The window appears but with a blank display field.

What am I missing?
Thanks very much as always!

CK

It’s hard to tell for sure from the screenshot, but it looks like you’ve got smart quotes around the a and the 9. Check to ensure you use only straight double quotes.

YES! That did it. I pasted the content in, but then added the quotes to the 9 to make sure it was treated as text, so I broke it then without realizing it.
Thank you!

Now I need to get a much larger JSON container working with For Each. I'll start with getting this small one to work first.

1 Like

I use the Filter With Dumb Quotes action so that it's reliable if I manually enter text that needs to be dealt with as JSON.

2 Likes

Yep, that occurred to me once I saw this error.

I hate to use the word "literally" in this sad era of American idiom, but it... literally was my first day/hour/work session messing with JSON in any form. Clearly the correct tool for the job at hand.