MongoDb query with multiselect component array of values


Using the $in operator to provide an array from the multi select component to the query.
Unable to validate the query in retool unless I add the array [] brackets. As I am providing an array to the query this results in double brackets and causes the query to return empty.

A screen shot of the situation:

(the ternary operator is used to provide all array values when none are selected)

What am I missing here?

Hi @dmnC!

Did you check to make sure there is a space between the closing }} of the transformer and the closing } of the wrapping object? You should be able to pass the value without using the added array brackets:

But not including that space can cause issues:

Would you look at that! Works like a charm!
Thank you. Hope it helps some else.