JSON help - Variable is empty

Can't get KM to show the values inside a JSON.

Example:

Took JSON example from here:(Multi-level JSON):

image
JSON path test 01.kmmacros (2.7 KB)

notice that the screenshot from Peter (in the other thread) shows
subscriberCount variable is assigned, showing empty -> 3 at the bottom:

but in my case it remains empty:
image

When I ran your macro, it worked for me:

image

I'm running Keyboard Maestro 9.0.3 on macOS 10.14.6 (Mojave).
What versions are you running?

9.0.3 in Catalina

It was empty when I ran your macro on my High Sierra system, too. But once I ran it, it was populated. I got the same results as JMichaelTX in a notification.

I also ran a JSON lint test on your JSON and didn't find an issue. So it looks like it's fine (if confusing with the empty variable before run).

1 Like

Thanks @mrpasini and @JMichaelTX, seems to be working now (after a system crash). But can't find why it didn't work before.

I went downstairs, came back and the Mac had crashed.
Logged in, tried the macro and now it works.
:scratches-head:

Keyboard Maestro does not simulate the entire macro to produce results for each action in the display of actions. Each action just displays the results as they currently are.

In your first image:

image

The current value of the “JSON” variable is empty (as shown at (1)).

The current value of the “subscriberCount” variable is empty (as shown at (2)).

Because of this, if you “Try” the last action, it will show nothing useful.

If you select all three actions and “Try”, it will set the variables and then should display the results.

Then the left hand side of the arrow (→) will show that the variable now has a value.