Solved! Go to Solution.
Either Java or Javascript callouts can be used in the Response flow of an Apigee Edge proxy. Within those callouts you can inspect or modify the response. It is super simple to do this in Javascript. For example, in Javascript:
var c = context.getVariable('response.content'); c = JSON.parse(c); c.additionalProperty = "This is an additional property"; if (c.existingProperty) { delete c.existingProperty; // remove an existing property } context.setVariable('response.content', JSON.stringify(c));
You can also do similar things in Java, but it is slightly more complicated, due to the greater degree of structure in Java itself. You could use the Jackson library to parse and stringify JSON, for example in Java.