context.expand produces different results between JSON and XML
I have some JSON response from a service, like:
{ "foo": "bar" }
I try to read this from a Groovy step, like:
log.info context.expand('${REST Request#Response#$..foo}')
log.info context.expand(...
$..foo => reads all the property keys with foo from json, returns a array / list always irrespective of count and as you know list in groovy is represented between [..]