0

I tried to match jsonpath assertion in SOAPUI 5.5.0 with the following statement: $.root[*][?(@.id==1)].updates

expected = 2

response to test:

{
"root": [
  [
    {
      "id": 2,
      "title": "hello world",
      "kind": "post",
      "updates": 3,
      "comments": [...]
    },
    {
      "id": 3,
      "title": "how to best practices",
      "kind": "post",
      "updates": 0,
      "comments": [...]
    }
  ],
  [
    {
      "id": 1,
      "title": "Release notes...",
      "kind": "newsletter",
      "updates": 2,
      "forks": [...]
    }
  ]
 ]
}

soapui seems not to find my nested entity with id=1.

1 Answers1

0

There are array of arrays in the root.

You can use below JSONpath to get the desired output

$..[?(@.id==1)].updates[0]

Rao
  • 20,781
  • 11
  • 57
  • 77