I’ve got some JSON data where the key/value pairs are separated so the keys are in one JSON block and the values in another (see the example below). I’m using:
- A JSONExtractor to get the "columns" fragment and then a StringReplacer and AttributeSplitter to convert it to a list.
- A JSONFragmenter to convert the "values" to a list.
- A PythonCaller to loop through the two lists and create the attributes.
Is there a way to do this without python? I’ve attached a zipped file of my workbench,
Example JSON
============
{
"columns": [
"sub_organisation",
"system_id",
"type",
"mounted",
"location",
"road_id",
"offset",
"side",
"geometry"
],
"rows": [
{
"message": null,
"values": [
24,
8,
"1840",
"Path",
8,
997,
10.9,
"L",
"POINT (1748664.55420184 5427732.02625559)"
]
},
{
"message": null,
"values": [
24,
48,
"TeAra",
"Path",
18,
997,
6.7,
"L",
"POINT (1748670.87886816 5427725.95775505)"
]
}
],
"total": 2
}



