You can use foreach loops, very simple if logic, variables, records, lists, structures, entities, you name it!
Using clear and intuitive way to call data.
Easiest is to use a Record in which you put structures, entities, lists or just directly use variables.Where you can call them by writing their name (which is shown in the record variable in service studio, see screenshots) using a . to seperate between object and attribute.
Make sure to call ToObject(MyRecordOrEntityOrListOrWhatever) when inputting it to the function.
Using: https://github.com/rexm/Handlebars.Net