How to handle variable number of collections in array

Here’s what I’m trying to do:

When I receive a new order from Ticket Tailor, take the information from that order and input it on a Google Sheet.

Right now it looks like this:

But the outputs under custom questions can vary in quantity based on the type of ticket that was selected.

Right now, I have it inputting like this in the Google Sheet:


But that approach only works when I have the ticket that presents 8 questions and the questions don’t line up properly when it’s a different number of questions.

How can I make this flexible enough to adapt to the varying number of questions and get the right answer into the right cell in Sheets?

1 Like

Hi @Ben_H

You can use map function in your google sheet mapping after iterating through each response, Example below.

{{map(115.`Custom Questions`; "answer"; "question"; "Preferred roommate(s)")}}


No matter how many questions you will have, once you map all questions available in your form and map it in a column where answer must go, you are sorted. If question answer doesn’t exist cell will be left empty.

I hope this helps!

Best,
@Prem_Patel