[REQUEST]If javascript function returns an array object - Snap to auto-convert it to a list

In the recent MQTT project

a javascript function needs to return two values - a topic and a payload.

Currently, the two are joined together "artifically" with "&&" and then manually split once they are returned to Snap context.

I was wondering if Snap could be easily modded to detect if returned value was an array. And if it is - returned a Snap list object?

Simon

Hmm, can't you have your function return a List instead?

untitled%20script%20pic

YLSNED :slight_smile:
Ta :slight_smile:

I had to google this one :sweat_smile:

Glad it helped!