Question

JSONFlattener w/ Arguments

  • 22 December 2017
  • 1 reply
  • 4 views

Badge

Hello: I have a surveymonkey survey responses that I have to loop through to capture all of the responses from 1 page. I capture the number of responses from an attribute returned from the GET from the API endpoint and I use that as my loop counter. My question is can I loop through the response body and pass the loop counter to capture the next survey response on this page? For instance, if I have data{}.id as an attribute, in a JSONFlattener can I dynamically set the value within the {} to @Value_count? Any help is greatly appreciated.


1 reply

Userlevel 4
Badge +30

Hi @bcrowley10,

For the count the number os elements of a list you can use the transformer ListElementCounter.

You can try to use before the transformer JSONFlattener.

Thanks,

Danilo

Reply