From the below response, I need to retrieve all the values of backgroundImage field(which can be found in Debug Sampler) and by using the ForEach Controller I need to call the values fetched from backgroundImage field and pass it in the path of the next request.
I used Regular exp Extract with code "backgroundImage":"(.*?)" to extract all the non-values, but sometimes it returns empty values and in this case, it fetches just an empty "" (double code) and passes in the path of the URL which leads to an error.
How can I avoid null and empty values in this scenario?
Response:
{"data":[{"id":5031,"createdAt":1582657779000,"updatedAt":null,"contentType":"TEXT","author":{"id":32,"teamName":"Team Content","teamShirtNumber":null,"role":"TEAM_LEAD","firstName":"Team Lead Jeremiah","lastName":"Dominguez Gorrin","profilePictureReference":"aca511ec-c552-4bce-90ce-d993684c5854"},"text":"Teeeeest"},{"id":5030,"createdAt":1582657696000,"updatedAt":null,"contentType":"TEXT","author":{"id":32,"teamName":"Team Content","teamShirtNumber":null,"role":"TEAM_LEAD","firstName":"Team Lead Jeremiah","lastName":"Dominguez Gorrin","profilePictureReference":"aca511ec-c552-4bce-90ce-d993684c5854"},"text":"Sassafras"},{"id":5029,"createdAt":1582657466000,"updatedAt":null,"contentType":"TEXT","author":{"id":32,"teamName":"Team Content","teamShirtNumber":null,"role":"TEAM_LEAD","firstName":"Team Lead Jeremiah","lastName":"Dominguez Gorrin","profilePictureReference":"aca511ec-c552-4bce-90ce-d993684c5854"},"text":"Lkdsasdad"},{"id":5028,"createdAt":1582657243000,"updatedAt":null,"contentType":"POLL","author":{"id":32,"teamName":"Team Content","teamShirtNumber":null,"role":"TEAM_LEAD","firstName":"Team Lead Jeremiah","lastName":"Dominguez Gorrin","profilePictureReference":"aca511ec-c552-4bce-90ce-d993684c5854"},"text":"Umfrage mit Bild Preview Upload","minValue":0.0,"maxValue":10.0,"minLabel":null,"maxLabel":null,"sliderIcon":null,"backgroundImage":"f426549f-b1e0-4d07-8786-685fcfa28835","result":{"attendances":0,"averageValue":null,"myAnswer":null},"votingEndAt":1585090800000},{"id":5027,"createdAt":1582657195000,"updatedAt":null,"contentType":"POLL","author":{"id":32,"teamName":"Team Content","teamShirtNumber":null,"role":"TEAM_LEAD","firstName":"Team Lead Jeremiah","lastName":"Dominguez Gorrin","profilePictureReference":"aca511ec-c552-4bce-90ce-d993684c5854"}
Thanks in Advance for your knowledgeable help!