Avatar

Community Advisor

hmmmmm, sorry, I thought that ct.content was a DOMElement. My bad. So yes, I've just checked, delete works for xml list, I was totally wrong, forget my message :slightly_smiling_face:

I think I know where your problem is : you insert the value 'i' into the id child attribute.

But i is not the value of your array(["2","1"], but the index.

So, you insert <child id="0"/> <child id="1"/> and not <child id="2"/> and <child id="1"/> as expected :winking_face:

Just tried and saw this problem.

Changing by

ctx.content.appendChild(<child id={ids[i]}/>)

resolved the problem :winking_face: (or if you prefered, you can also use the foreach() instruction instead of for(), and keep the 'i')