Return a scalar value with EvaluateJSONPath processor
I need to use wildcard syntax in a JSON path to return the color of the bike as a scalar value. However, the problem is that when I use wildcard syntax with the EvaluateJSONPath processor it always returns an array. For example
This path returns a scalar value: $.store.bicycle.color ==> red
This path returns an array: $..bicycle.color ==> ['red']
Is it possible to use the EvaluateJSONPath processor with wildcards and get a scalar value in return?
Or, is it possible to extract the value from the array without using an additional processor?
{
"store": {
"bicycle": {
"color": "red",
"price": 19.95
}
},
"expensive": 10
}

