How to create the JSON request body in POST API Call

Hi All,

I need help in creating the JSON request body dynamically in POST API call. PFB the requirement.
Sample Request Body:
{
“Requester”: {
“Username”: " ",
“Displayname”: null
},
“Mailboxname”: “”,
“Manager”: {
“Username”: “”,
“Displayname”: null
},
“BackupManager”: {
“Username”: “andersa28”,
“Displayname”: null
},

"Members": [
    {
        "Username": "",
        "Displayname": null
    }

{
“Username”: “”,
“Displayname”: null
}
{
“Username”: “”,
“Displayname”: null
}
.
.
.
.
.

.
{
“Username”: “”,
“Displayname”: null
}

],
"Description": "Test ",
"WONumber":""

}

Above request body Members Array can have any number of users and its not constant. We need to add the list of variable values depends on the no of users dynamically. Anyone knows how we can add those.?

@prabhu_kiran You could create a Dictionary variable that contains all the output properties you want in your HTTP request, and a List variable containing another set of Dictionary variables that has the properties of each member.

Then you could use the JsonConvert function to convert it into a String and use it in the HTTP request.

See attached example as a starting point.
JsonConvertExample.xaml (8.4 KB)