I want to delete the *params* property from the response body. I've tried a javascript callout, but haven't been able to identify the correct variable / syntax to remove it. I also tried assign-message policy but that seemed to only be for headers and query params.
{ "action": "get", "application": "abc", "params": { "client_secret": [ "my_secret" ], "client_id": [ "my_id" ] }, "path": "/parts", "uri": "https://www.google.com", "entities": [ ...]...}
Solved! Go to Solution.
var r = JSON.parse(context.getVariable('response.content')) delete r.params context.setVariable('response.content', JSON.stringify(r))
Give that a try. For better robustness, probably good to throw a hasOwnProperty check in there first.
(This has the precisely correct number of semicolons...)