0

Let's say I have a JSON like this:

{
  "roles": [
    "role1",
    "role2",
    "super_role1",
    "super_role2"
  ]
}

And I want to filter with JSONPath to only match 'super*' and get a list with the matches:

["super_role1", "super_role2"]

What should be my path expression ?

I have tried .roles['super*'], and other variants but I cannot find a way to simply filter on the strings of a list.

Jeremy D
  • 1
  • 1

1 Answers1

1

Have you tried something with actual expressions? A quick google gave me https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html#filters

Koos Gadellaa
  • 1,220
  • 7
  • 17