Forum Discussion

dvjana's avatar
New Contributor
7 years ago

JSONPath match filter by property name containing brackets

version: SoapUI 5.3.0   Currently I have difficulties with matching JSON property value, which has brackets in it. Query perfectly worked with names, containing commas, dashes and other special cha...
  • PaulMS's avatar
    7 years ago

    The JSONPath should be valid with brackets but could be a defect

    A script assertion workaround.


    import groovy.json.JsonSlurper
    jsonResponse = new JsonSlurper().parseText(context.response)
    price = jsonResponse.priceArray.find { == '1 EUR (0-10 kg)' }.price
    assert price == 55.5