Need help with the JSON example

The example for using JSON (https://wiki.keyboardmaestro.com/action/Set_JSON_Value) doesn't seem to work.

First it says to do this:
image

Then it says to do this:
image

But when I do the second statement, it doesn't just change the first name, it also erases the last name from J, as you can see at the bottom of this image:

image

There's a 99% chance I'm simply confused here. Why am I confused? How do I change only one item?

Those quotes in your action look suspiciously curly.

JSON will definitely not be happy with curly quotes.

1 Like

You have a superb eye.

I noticed the curly-ish quotes too. But I thought it was just a display issue. Indeed I actually tried to fix their curly nature but the KM editor wasn't letting me. I'll try harder now.

That solved the problem. But there's still a related problem. I find it impossible to type a straight double quote into that text field. The KM Editor always converts it to a curly double quote. Is that possibly a bug?

It wasn't easy figuring out how to bypass that quote processing.

As I remember, you can change it under system settings for the keyboard.

1 Like

Ahhh! I have "Use Smart quotes and Dashes" turned on there. That's probably the problem. In my opinion, this should be documented as a requirement for this action to work. As far as I know, I'm using the default setting.

1 Like

I was literally losing my grip on reality until I found this thread.

Kudos to y'all for restoring my sanity.

Another thanks for this thread.
I was going crazy why I was getting errors.

Regards,
Brett