โ12-26-2019 10:46 PM
Hi Team,
I have an input json in linkedHashMap in below format:
[
{
โPathโ: โ/OrgName/sharedโ,
โsubject_typeโ: [
โGROUPโ,
โGROUPโ,
โGROUPโ,
โUSERโ
],
โsubjectโ: [
โOperationsโ,
โadminsโ,
โArchitectsโ,
โxyz@xyz.comโ
],
โpermsโ: [
[
โRโ,
โXโ,
โWโ
],
[
โRโ,
โXโ
],
[
โRโ,
โXโ
],
[
โRโ,
โXโ
]
]
},
{
โPathโ: โ/OrgName/shared2โ,
โsubject_typeโ: [
โGROUPโ,
โGROUPโ,
โGROUPโ,
โUSERโ
],
โsubjectโ: [
โOperationsโ,
โadminsโ,
โArchitectsโ,
โabc@abc.comโ
],
โpermsโ: [
[
โRโ,
โXโ,
โWโ
],
[
โRโ,
โXโ
],
[
โRโ,
โXโ
],
[
โRโ,
โXโ
]
]
}
]
My requirement is to map the respective fields and need them in a file as below:
{
{ โPathโ: โ/OrgName/sharedโ,
โsubject_typeโ:โGROUPโ,
โsubjectโ:โOperationsโ
โpermsโ: [
โRโ,
โXโ,
โWโ
]
},
{ โPathโ: โ/OrgName/sharedโ,
โsubject_typeโ:โGROUPโ,
โsubjectโ:โadminsโ
โpermsโ:
[
โRโ,
โXโ
]
},
{ "Path": "/OrgName/shared",
"subject_type":"GROUP",
"subject":"Architects"
"perms":
[
"R",
"X"
]
},
{ "Path": "/OrgName/shared",
"subject_type":"user",
"subject":"xyz@xyz.com"
"perms":
[
"R",
"X"
]
}
}
can it be achieved using any inbuilt snaps or should we go for a script? Any script snippets is appreciated.
Regards,
Satya
Solved! Go to Solution.
โ12-31-2019 02:14 AM
Hi Satya,
Please find the attached pipeline for the solution.
Regards,
Anil
โ12-27-2019 07:01 AM
Please take a look at the sl.zip function.
โ01-06-2020 03:30 AM
Many thanks for the reply. This resolved my issue.
โ12-31-2019 02:14 AM
Hi Satya,
Please find the attached pipeline for the solution.
Regards,
Anil
โ01-06-2020 03:31 AM
Hello Anil,
The pipeline exactly matches my requirement. Thank you for your time on this.
Regards,
Satya