Add OR and AND condition in json path query

  {

  "feature": {

    "properties": {

      "responses": [

        {

          "detail": "VALID"

        }

      ],

      "status": "CANCELED"

    }

  }

}


Can use the below online tool to test the json path

https://jsonpath.herokuapp.com/


Json Path to filter such json


$.feature.properties[?((@.status=='COMPLETED' && @.responses[0].['detail']=='VALID') || (@.status=='CANCELED'))]

Comments