Garrett
5 years agoNew Contributor II
JSON returns Column Names separately from the Rows
I have a REST API that returns something like the following:
entity":
{
“items”:
[
{
“tableName”:
“mytable”
“count”:
7995
“columnNames”:
[
“c1”,“c2”,“c3”,“c4”
]
“rows”:
...
- 5 years ago
If I captured your input data correctly, this attached pipeline should help get you started:
Community.9525.slp (4.8 KB)
The mapper combines the Array map() method with the sl.zipObject() method to bring the column names and row values together in an object array. The following splitter will flatten the data for your SQL Insert.