Tinderbox Forum

Remove first item in a set or list, leave the rest

Hey there, if I have a list or a set, e.g. a;b;c;d;e how would I go about returning all the value of the list or set except the first item, in this case, “a”? Not, the value does not matter, I want to always remove the first item in the list/set and then copy the rest to another attribute.

$MySet=$MySet-$MySet.at(0)

This works to remove the first value.

Brilliant!!! Thanks. :pray:

In Tinderbox 9 the syntax can be shortened to:

$MySet=MySet-MySet[0]

3 Likes