Removing parameters outputted in JSON response. How to remove array and only show specific array of fields?

This helps Danny, Thank you - After saving the JSON object by deleting status from POST response body i cannot use same data, still i need to modify couple attributes in {{putRequestBody}} before making PUT request. how to do that?

Change them either before saving the Response Body variable or in the Pre-Request of the PUT request.

Just another basic example and not the most efficient or best way of doing it:

let modifiedBody = JSON.parse(pm.environment.get('putRequestBody'))

modifiedBody.json = "Danny"

pm.environment.set('modifiedBody', JSON.stringify(modifiedBody))

Then use that {{modifiedBody}} variable in the PUT request body.

1 Like

This solution works for me Danny, Thank you for your prompt and accurate response.

1 Like