Using a "Query JSON with SQL" result as a condition to another query

Hi guys:
I did a "Query JSON with SQL" (query 1), that result in a 3 dimension array. I need one of those dimensions to be used as a condition to another query (query 2). Something like:
query 2:
Select * from table1 where column in (query1[dimension])

I tried to use a transformer to extract the dimension i need from query1, but i havent figure it out yet.
Can anybody help me , please?

Hi @AndrewG! Would you mind posting an example of the structure of your 3-dimensional array along with the dimension you're trying to grab?

Hi @Kabirdas, Sure:
Here is the array. I want to use all the values of the dimesion TAX_id as a condition to another query. something like

 ... Where ... in (TAX_id)


Hey there :wave:

You should be able to through something like {{[i].Tax_id }}

I am linking you a section in our docs here with a similar example :slightly_smiling_face:

Hi Lauren. Look i tried as you said but the result is null. Do you know why?


Sorry for misunderstanding your use case here! It should actually look something like {{ formatDataAsObject( }}.

1 Like