Functions Don't Work With JSON Path

It seems several functions don't work with JSON path.

For example COUNT() or even JSONVALUE(). The text turned into red, even the text token %JSONValue% worked well.

Can some one shed some light on this?

Screenshot 2021-04-24 at 20.36.25

Hey Pang,

As far as I can see it has to be a bug.


This is from your own examples on the wiki.

You can see that the JSONVALUE() function fails after field “a”, but the JSONValue text token soldiers on.


TEST ⇢ JSON ⇢ Peter's Wiki Example v1.00.kmmacros (7.0 KB)

Calculations work on numbers.

J[2].last evaluates to haha. haha is not a number. Hence the error.

It should really be orange, not red. But it is an error nonetheless.

Change “haha” to “3” and the macro works.

It fails after a because a has a value of 9, which is a number. The remainder are not numbers.

The germane point being – functions are calculations and only return numbers.

@alcibiades – please note.