Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Transform LISTS as a MAP (Json)

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

Transform LISTS as a MAP (Json)

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"

"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