How do I build a job to keep calling the tRESTClient and loop through the previous tRestClient Response?
I'm new to Studio and not sure how to build the following scenario. A category can have zero to multiple categories and it can have multiple levels deep. To get a category or categories, I call the API with the category's ID.
In the outline below, ID#1 named CategoryA contains 2 categories #3 CategoryZ and #4 CategoryN. In one of those categories, #3 CategoryZ contains 1 category #5 CategoryN. This outline can keep going into multiple levels deep.
ID#1 CategoryA
ID#3 CategoryZ
ID#5 CategoryN
ID#4 CategoryX
The API is called for ID#1 and the response lists ID#3 and ID#4. Then I have to call the API for ID#3 to see if there's any categories; in the example above I will get ID#5 in the response. Then I have to call the API for ID#5 to see if there's any categories and in this case the response is null. Lastly, I will call the API for ID#4 and the response will be null.
How do I build a job to keep calling the tRESTClient and loop through the previous tRestClient Response until the response is null?