Forum Discussion

yamithu's avatar
yamithu
New Contributor
11 years ago

assertion: JsonPath RegEx Match - on a path which return array

i'm traying to use JsonPath RegEx Match on a path which return array ($.groupOperationList[*].operationType)

the proble is that I don't know who looks the value it returns

 

for example:

{"groupOperationList": [
                  {"id": 3,
                    "operationType": 2,
                   },
                  {"id": 3,
                    "operationType": 2,
                   },

                  {"id": 3,
                    "operationType": 3,
                   }

]}

 

and I want to verified there isn't operationType 1

 

for single value:

$.groupOperationList[0].operationType

regex: [^1]

is enough, but for multiple value it doesn't work

 

No RepliesBe the first to reply