Passing a Shortcuts dictionaty to Scriptable

Hi! I am trying to pass a dictionaty from shortcuts to scriptable, and I am wondering what would be the best approach. I build the dictionary on shortcuts with a few of fields, and then copy it to the pasteboard. Then, I read it on scriptable. As far as I see, the dictionary reaches scriptable as a string with the form {“nameOfTheXField” = “valueOfTheXField” , "nameOf… }

Is that right? If this is the case I guess that i will need to inspcect the full string looking for the names of the fields and then tatke the next part if the string till the next “,” as the value. Am I right?

I would recommend you get the clipboard and then do JSON.parse on that. Then you have an object in JS to manipulate as you wish.


It does work, smooth and perfectly! Thanks a lot!

1 Like