Tranformer Issue

Hi Team,

I am using two queries and created one transformer from both queries, however I am not able to display data in required format in my table.

below is my transformer code:
var ruleField = {{Rule_Field.data}};
var ruleMessageMapping = {{MessageCollection.data}};
let res = [];
let obj = [];
let res1;
for(let i =0;i<ruleField.length;i++)
{
var ree= ruleField[i].keyword_list;
for(let x =0;x<ruleField[i].keyword_list.length;x++)
{
for(let y =0;y<ruleMessageMapping.length;y++)
{
if(ruleField[i].keyword_list[x] == ruleMessageMapping[y].key)
{
res.push(ruleMessageMapping[y].key,ruleMessageMapping[y].value);
}

     }
 }
return res

}

below is the screen shot of my table:

here my requirement is I need to create for every keyword one row from my keyword list.
please help me to resolve this issue.

Thanks,
Lalitha.C

Check out this post....

Hey @lalitha1024!

Curious to know if the thread Scott linked helps here! Beyond that I also have a few extra questions here for some further context:

  1. Is this the full code of your transformer?
  2. Where is the transformer being referenced?
  3. Do you have an example of how you'd like the result to look?
  4. Could you maybe share a sample of the data from each of your queries?

Hi Kabirdas,

Yes, that was the full code, later changed some code.
Tranformer defined form 2 queries and to display data created one more Query JSON with SQL which fulfill my requirement.

Thanks,
Lalitha.C