0

The following check produces an error claiming

No member of type class JsonFilter found for type Seq[String]

...
.check(
jsonPath("$..foo").ofType[Seq[String]]
   .transform((a) => {println(a);a})
   .saveAs("bar")
)

Given the following json, I'd expect the out put to look like: List(f1, f2, f3)

{
"one": {"foo": "f1"},
"two": {"foo": "f2"},
"three": {"foo": "f3"},
}
Justin Wrobel
  • 1,981
  • 2
  • 23
  • 36

1 Answers1

1

findAll is what I was searching for.

.check(
jsonPath("$..foo").findAll
   .transform((a) => {println(a);a})
   .saveAs("bar")
)

Sources

Justin Wrobel
  • 1,981
  • 2
  • 23
  • 36