Okay, thank you this is very helpful. Yes, I'm aware fo the getTemplateVariables method but, as you noted, I didn't know the element of the placeholder and therefore woulnd't know which method I would need to call to set/iterate the value(s).
I will use the code sample you provided. Thanks