I’ve created a variable to extract and store the “partyId” from objects within an array. This works great, and I have about 1,500 partyId’s stored within the variable.
let PartyList = [1]
_.each(pm.response.json(), (arrItem) => {
PartyList.push(arrItem.partyId)
})pm.environment.set(‘PartyList’, JSON.stringify(PartyList))
I have a second GET in my collection I’d like to run based off the results stored in my variable.
//api/common/v1/parties/{{PartyList}}?properties=Relationships
The filter on the endpoint can only support one partyId at once and therefore when I simply insert my variable the request fails. Some how, I need to loop requests while cycling through the values store in my variable.
Hoping there’s a sensible way to approach this. Thank you in advance for any help.