How to convert SQL Output into JSON format

What you want to do is turn on Transform results for the DB query, and then use this builtin "retool" method.

Paste in return formatDataAsArray(data); and you will get back the format you want.

2 Likes