A simple policy demonstrating how to concatenate two JSON strings. The policy utilizes RegEx to pull the key/value pairs (removing the curly braces).
A source variable is set to the below.
{
"user4": "Bill",
"user5": "Mo",
"user6": "Greg"
}
This policy will add the above JSON to the existing JSON
{
"user1": "Joe",
"user2": "Alec",
"user3": "Matt"
}
Resulting in:
{
"user1": "Joe",
"user2": "Alec",
"user3": "Matt",
"user4": "Bill",
"user5": "Mo",
"user6": "Greg"
}