Lets say we have this payload as input for the action, which is an array of groups.
[
{
"lastUpdated": "2023-09-29T10:41:01.000Z",
"lastMembershipUpdated": "2023-09-29T13:02:48.000Z",
"created": "2023-09-29T10:41:01.000Z",
"profile": {
"name": "Everyone",
"description": "All users in your organization"
},
"objectClass": [
"okta:user_group"
],
"id": "00gbmoe6l7vn9hhyh5d7",
"type": "BUILT_IN"
},
{
"lastUpdated": "2023-09-29T10:41:03.000Z",
"lastMembershipUpdated": "2023-09-29T10:41:03.000Z",
"created": "2023-09-29T10:41:03.000Z",
"profile": {
"name": "Okta Administrators",
"description": "Okta manages this group, which contains all administrators in your organization."
},
"objectClass": [
"okta:user_group"
],
"id": "00gbmoe6ohcS7J7pq5d7",
"type": "BUILT_IN"
},
{
"lastUpdated": "2023-09-29T13:03:18.000Z",
"lastMembershipUpdated": "2024-04-24T16:51:49.000Z",
"created": "2023-09-29T13:03:18.000Z",
"profile": {
"name": "Superheros",
"description": null
},
"objectClass": [
"okta:user_group"
],
"id": "00gbms1al0OOKFwsW5d7",
"type": "OKTA_GROUP"
}
]
Now we want to add a new property called groupMembers into each array element.
The groupMembers data comes from a collection of data before and we are using Dynamic Flow Variable to store the data.
Data looks like this:
Here is how we merge it