As shown in the below image I want to filter out List Elements of a certain length and insert them into the original list to act as duplicates. I.e. for this case I wish to duplicate List Elements 3 and 7, however the quantity of duplicates and their list order will vary as my source information is updated. I have tried the Insert node to no avail.
ln;
a = [Imperative]
{
b = [];
c = 0;
for (a in ln)
{
if (a.Length > 600)
{
b[c]=List.Cycle(a,3);
c = c + 1;
}
else
{
b[c] = [a];
c = c + 1;
}
}
return b;
};