0

Having json, provide below:

[
  {
    "delta": {
      "status": {
        "old": {
          "status": "Stop"
        },
        "new": {
          "status": "Start"
        }
      }
    }
  }
]

How I can get only delta which have new.status = 'Start' ?

I try to use Apache camel choice().when().jsonpath(...)

Why below statement isn't work ?

$..[?(@.delta.status.new.status=='Start')]
$..delta.status.new[?(@.status=='Start')]

I used jsonpath.com

millka_15
  • 369
  • 2
  • 10

1 Answers1

0

Your statements are just OK, I have tested it with jsonpath.herokuapp and camel jsonpath component, for example the second one returns {status: Start}

Greenev
  • 871
  • 6
  • 23