How do you add items to a JSON Array?

You can combine those three actions into one:

image

Append to a JSON Array (compact).kmmacros (3.2 KB)

Image

...the extra maths being required because of KM's 1-based array indexing.

Otherwise, isn't JSON just text in a standardised format? In which case:

image

Append to a JSON Array (strings).kmmacros (3.2 KB)

Image

Both should also work with "internal" arrays if you've a nested format -- in both cases you'd be pulling the "internal" array into Local_Array, manipulating it, then replacing the original in the blob.

2 Likes