Bug in trasformer

Hi there.

I actually always use a separate transformer. I find that the code can get lost in the query transformer, you need to remember it's there; whereas if a table uses a separate js transformer as it's input then that's really traceable. The other benefit is that, when debugging, you can compare the data that comes straight out of the query with the transformer. As a non-js-expert, it's normally my transformer code that's broken :slightly_frowning_face:

There's some useful syntax using formatDataAsObject to return a single 'column' from a query in this post which I came across recently

Flatten or Filter Nested JSON - Queries and Resources - Retool Forum

Often, though the query response is already in object format so you just need to use 'object.key' syntax.

For uniques, I make very frequent use of this kind of pattern using the preshipped _.uniq function from the lodash library:

image

You could write it in less code but I find it easy to read like this.

hth