The set-body policy can be configured to use the Liquid templating language to transform the body of a request or response.
This is useful for accessing object properties, but doesn’t work on arrays because they’re not a valid standalone JSON object. Instead, Liquid strips them, eg [{},{}] to {},{}.
<set-body template="liquid">{{body.myarray}}</set-body>Fortunately we can use JObject instead:
<set-body>@{
context.Response.Body.As<JToken>()["myarray"].ToString();
}</set-body>