I am attempting to have a JSON payload be directed based on the sum of values in a JSON array. I want the cmessagerouter to take the sum of multiple elements and if it equals 0 then the payload should flow that way. If the OBLIGATEDAMT fields all sum up to 0, then they should flow the directed way in the image below.
The first image shows a flow of the route as expected along with an attempted Jsonpath expression.
The 2nd image shows the JSON file and the fields the JSONpath expression should be operating against.
The expressions I have tried are:
"$.sum[?(@.AWARD.AWARDLINE.OBLIGATEDAMT == '0')]"
"$.sum($.AWARD.AWARDLINE[?(@.OBLIGATEDAMT == 0)].OBLIGATEDAMT)"