cancel
Showing results for 
Search instead for 
Did you mean: 

JSON Path Match for multiple objects/elements

Highlighted
Frequent Visitor

JSON Path Match for multiple objects/elements

Hi, guys!

Is there a way to write an assertion in SoapUI for matching multiple objects/elements in one assertion?

I ask about situation when need to combine firstName+lastName+address.streetAddress+address.city in a JSON Path Match assertion:

 

[
{
  "firstName": "John",
  "lastName" : "doe",
  "age"      : 26,
  "address"  : {
    "streetAddress": "naist street",
    "city"         : "Nara",
    "postalCode"   : "630-0192"
  },
  "phoneNumbers": [
    {
      "type"  : "iPhone",
      "number": "0123-4567-8888"
    },
    {
      "type"  : "home",
      "number": "0123-4567-8910"
    }
  ]
}
]

 

 

Estimated result #1:

 

[{firstName=John, lastName=doe, streetAddress=naist street, city=Nara}]

 

Estimated result #2(At least this way):

 

[{streetAddress=naist street, city=Nara}]

 

 Thank you very much...

New Here?
Join us and watch the welcome video:
Top Kudoed Authors