Is there a way to retrieve all the values from a data source as a list in readyAPI ? if yes, how can i do it ? otherwise, any suggestion about how to populate a list in a request body from a json response of an API ?
Thanks in advance !
This is an example of the response,
`{
"store" : {
"book" : [
{
"id" : 1,
"category" : "reference",
"author" : "Nigel Rees",
"title" : "Sayings of the Century",
"price" : {
"usd" : 8.95,
"euro" : 8.95,
"pound" : 7.95
}
},
{
"id" : 2,
"category" : "fiction",
"author" : "Evelyn Waugh",
"title" : "Sword of Honour",
"price" : {
"usd" : 12.99,
"euro" : 12.99,
"pound" : 11.99
}
},
{
"id" : 3,
"category" : "fiction",
"author" : "Herman Melville",
"title" : "Moby Dick",
"isbn" : "0-553-21311-3",
"price" : {
"usd" : 8.99,
"euro" : 8.99,
"pound" : 7.99
}
},
],
}
}`
I used data source but it retrieves only the last value,
i want all the books id to be populated as a liste in the booksId, this is my request body :
{"booksId":[1,2,3],
"reference":"test"}