Transform LISTS as a MAP (Json)

asked 2019-03-04 09:38:01 -0500

Nightwatch gravatar image

updated 2019-03-04 10:50:11 -0500

metadaddy gravatar image

I have a query in a JDBC Lookup block that produces X "rows" as X LISTS in the Output Data:

Description : LIST [ 3 ]
0 : STRING "a"
1 : STRING "b"
2 : STRING "c"
Code : LIST [ 3 ]
0 : STRING "1"
1 : STRING "2"
2 : STRING "3"
Name : LIST [ 3 ]
0 : STRING "bob"
1 : STRING "tom"
2 : STRING "jack"

I would like to transform this 3 LISTS as a Json structure (a single record with a /Output name) as this:

[{
  "Description": "a",
  "Code": "1",
  "Name": "bob"
},
{
  "Description": "b",
  "Code": "2",
  "Name": "tom"
},
{
  "Description": "c",
  "Code": "3",
  "Name": "jack"
}]

How can I obtain this result? thanks in advance

edit retag flag offensive close merge delete