I'm creating a scenario where I need to include the Subgroup UIDs in the Parent group. Parent groups with members (UIDs) and some parent groups with members (UIDs) and subgroup names can be found in the inbound file that I'm extracting. Members of the subgroups (UIDs) are arriving individually. The requirement is that I add the UIDs of the members of the subgroup to the parent group, which already has the name of the subgroup.
Please help me to implement Javascript or Groovy script to get this conclusion.
Kindly see the below mentioned example for inbound file:
{ "cn":[ "LEG-onit_le-business" ], "member" :[ "cn=LEGG-onit-auto_function-hr,ou=Groups,o=world", "cn=LEGG-onit-test_le-business-manual,ou=Groups,o=world", "uid=DDO357,ou=people,ou=pg,o=world" ], }
{ "cn":[ "LEGG-onit-auto_function" ], "member" :[ "uid=AP1460,ou=people,ou=pg,o=world", "uid=CT0306,ou=people,ou=pg,o=world" ], }
{ "cn":[ "LEGG-onit-test_le-business-manual" ], "member" :[ "uid=EE3051,ou=people,ou=pg,o=world", "uid=tt4386,ou=people,ou=pg,o=world" ], }
Note: LEG - indicates Parent Group LEGG - indicates Subgroup