Forum Discussion

ruchitvijay's avatar
ruchitvijay
New Contributor
6 years ago

Mapping requirement

I have the following :-
[{
“key”:[
“name”,
“organization”,
“city”,
“state”
],
“value”:[
“abc”,
“xyz”,
“pune”,
“maharashtra”
]},
{
“key”:[
“name”,
“organization”,
“city”,
“state”
],
“value”:[
“cde”,
“pqr”,
“mumbai”,
“maharashtra”
]},
{
“key”:[
“name”
“city”
“country”
],
“value”:[
“def”
“nashik”
“india”
]
}]

how do i convert this into key:value set to write this into csv
Requirement-
{
“name”:{“abc”, “cde”, “def”},
“organization”:{“xyz”, “pqr”, “null”},
“city”:{“pune”, “mumbai”, “nashik”},
country:{“null”, “null”, “india”}
}