Help dealing with multiple responses from API in to Variables

Hi there, I have no issue calling an API and getting a single result to map to a variable. But how do I handle the case where the API returns multiple results and I want Alexa to utilize all the results?

For example, user can search for food categories from a food database. Their input is “vegetables” (which is mapped to a variable using CAPTURE block), so an api call is made that searches for vegetables, something like{UserInput}


Now I have these results mapped to variables in this fashion: --> {vegresult}

This obviously only captures the first result…how do I go about capturing subsequent results without having to create a separate variable mapping for each? I mean if this had 20 results I assume there’s a better way to handle it that: --> {vegresult} --> {vegresult1} --> {vegresult2}

Sorry…probably a very beginner question :slight_smile:

Hi! It can be done with the help of the Code block.
This is what we are doing for the RSS feeds in this tutorial: Using a RSS feed to make a Podcast Skill

Thanks, I’ll take a look.