04-25-2024 05:49 PM
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.
Solved! Go to Solution.
04-26-2024 12:08 AM
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.
04-26-2024 12:08 AM
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.
04-26-2024 11:00 AM
Thank you @Aleksandar_A , it worked.
04-26-2024 01:13 PM
@Aleksandar_A AWS credit for you!