Homey script best practice: how to return multiple results to the flow?

What is the most elegant way to return multiple results from a Homey script back to the flow? I was thinking something similar to flow tokens. Yeah, I know I could return a JSON and then parse that multiple times to get the individual results, but that’s not my definition of “elegant” :wink:

If you use the JSON handler app you only need one card for parsing :wink:

I guess I gave myself the answer to that question: use flow tokens. Just use

await tag(<name>,<value>);

at the end of your Homey script to return as many flow tokens as necessary with name and value. You just need to run the script once in order for the token to show up in the selection in the flow editor.