Hi everyone,
I am working on a script with an extraction of multiple items from a JSON response similar to this example:
jsonPath("$[*].id").findAll.saveAs(“ids”)
I was looking for an “easy” way to not only save the just extracted ids, but also appending them to an already existing list in the session (since the request with this extraction is executed in a loop).
Unfortunately I don’t find anything like:
.saveAs(“ids”, append=true)
Is that so that the way to achieve that is to implement an Expression[Session] (or an ActionBuilder?) doing it, provide it with the source and target session attribute identifiers and then execute in an .exec() after the relevant request?
Like:
exec(requestDefinitionWithAnExtractionThatSavesIds)
.exec(myAppendingExpression(sourceAttr=“ids”, destAttr=“allIdsList”))
Regards,
Tomasz