wrote:
Hi Cody,
If there are no nested Lists, the ListAppendAll (instead of a For Each + ListAppend) is the best (and fastest) way to go. However, if, like in your case, there are nested lists, you need to For Each on the outer list (like you already do), and then ListAppendAll (+ mapping) the inner List (unless that has a nested list as well, etc.).
Since that latter ListAppendAll needs the right target, make sure to either use an intermediate Local Variable for the mapping (via an Assign) + ListAppendAll, then ListAppend that to the output List, or alternatively, ListAppend to the output List without an intermediate Local Variable, and use List indexing to get the last element for the ListAppendAll (something like OutputList[OutputList.Length-1]).
This got me one step closer, the results I'm getting back are the initial list items but underneath are the category list items. You mentioned using list indexing but as I have currently in my initial list, the ID is set to NullIdentifier(), effectively making all the ID's 0. It might be easier to see how I have this set up rather than trying to describe it though:
Where CategoryResults and GetMediaList are the endpoints for their respective APIs.
I was thinking it might be easiest to have an id start at 0 and increment like a traditional for loop (for(i=0;i<len;i++)) and have the ListAppendAll reference that. How do I do something like that?