cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Help to parse Json data into csv

deeps
New Contributor II

I need help to parse this data into csv format 

[
{
"id": "12345",
"email": "mary@xyz.com",
"status": "active",
"groups": [
"Software","Hardware"
],
"username": "r1234",
"domain": "xyz.com",
"orgSpecific": true,
"firstName": "Mary",
"lastName": "R",
"countryCode": "US",
"userType": "ID"
},
{
"id": "1234",
"email": "maxie@xyz.com",
"status": "active",
"groups": [
"Software","Hardware","Internal","External"
],
"username": "r124",
"domain": "xyz.com",
"orgSpecific": true,
"firstName": "Maxie",
"lastName": "R",
"countryCode": "US",
"userType": "ID"
},
{
"id": "123456",
"email": "freshman@xyz.com",
"status": "active",
"username": "F1234",
"domain": "xyz.com",
"orgSpecific": true,
"firstName": "Freshman",
"lastName": "F",
"countryCode": "US",
"userType": "ID"
}
]

I tried Autoprep , Json splitter snap but no luck.  

1 ACCEPTED SOLUTION

AleksandarAngel
Contributor III

Hello @deeps,

I'm not sure of how exactly you want your csv to be structured, but you can join the groups array to a string using .join() function in a Mapper Snap, and then you will have a flat structure that you can format as CSV.

 

Please refer to the attached pipeline, and let me know if this helps you.

Regards,

Aleksandar.

View solution in original post

3 REPLIES 3

AleksandarAngel
Contributor III

Hello @deeps,

I'm not sure of how exactly you want your csv to be structured, but you can join the groups array to a string using .join() function in a Mapper Snap, and then you will have a flat structure that you can format as CSV.

 

Please refer to the attached pipeline, and let me know if this helps you.

Regards,

Aleksandar.

deeps
New Contributor II

Thank you @AleksandarAngel , it worked. 

dmiller
Admin Admin
Admin

@AleksandarAngel  AWS credit for you!


Diane Miller
Community Manager