More eloquently MAP JSON to HTML

My goal is to send an automated email from an Affinity List. Affinity has a new v2 API.

I have made progress and am able to do what I need to do. However I am wondering if there is a more eloquent solution to what I am trying to do.

Here is an example of my JSON

This is how I am making my HTML using an interator and a Text Aggregator.

And here is my output
Output

One thing that I have not been able to do is to tell if there is 1 or two collections under the Owners field. I would like to insert an & character if there is the second collection between the first and the second name.

You can use the built-in function if and length

e.g.:

{{ if( length(1.variable) > 0; "&" + space + 1.variable; emptystring) }}

For more information, see

2 Likes