I’m trying to get Shortcuts to recognize javascript arrays as list but to no avail.
Example:
var data = [1,2,3]
Script.setShourtcutOutput(data)
Script.complete()
Shortcut receives this as a string "[1,2,3]"
instead of a list with 3 items.
For now, my workaround is:
var data = [1,2,3]
Script.setShourtcutOutput( {res: data} )
Script.complete()
…which gets interpreted correctly as a dictionary so I can grab the value of res
which gets identified as a list.