Forum Discussion

richie's avatar
richie
Community Hero
6 years ago
Solved

JSONPATH - MULTIPLE RECORD SYNTAX IN GROOVYSCRIPT?

Hi,   I always struggle with JSONPATH relative to XPATH and this is another instance.   I have an assertion in my groovy script with the following syntax for a single record in the resultset ...
  • nmrao's avatar
    6 years ago
    Are you expecting result is list of names?

    If so,

    assert object.data.Name == ['name1', 'name2'...]

    Does it help?