Could anyone please guide me how do I construct a dynamic json http request body based on the # of ids that were stored in a list? Below is an example of required request body: sample request body I had a JSR223 script in place to collect IDs and store them in a list. Below is part of my script (post processor) to pass each id in the list to the http request body.
for (int j=0; j < myList.size(); j++) {
vars.put(“accountId”, qualifiedList[j])
}
And below is the structure of HTTP request body: HTTP request body
The issue I had was that with this configuration, only the last id in the list was passed to the body... So how do I construct a dynamic json payload that contains all ids as the example request body?