Keyboard Maestro includes tokens which allow us to work with:
- CSV formatted arrays,
- and JSON formatted arrays.
Obtaining individual items in the array by a 1-based index, and retrieving the length of the array from index
- CSV arrays: manual:Variables [Keyboard Maestro Wiki]
- JSON arrays: manual:JSON [Keyboard Maestro Wiki]
Here is a simple example of using two custom plugins:
[SPLIT :: Custom plugin – Split a String to a KM Array](SPLIT :: Custom plugin – Split a String to a KM Array)
[JOIN :: Custom plugin – Join a KM Array with a delimite](JOIN :: Custom plugin – Join a KM Array with a delimiter)
Split can create CSV or JSON formatted KM arrays, using
and Join can create new strings by intercalating a supplied delimiter between the items of a KM Array.