Oops...

This website is made for modern browsers. You are seeing this, because your browser is missing a feature or two. Please install the latest update or switch to a modern browser. See you soon.

Sort lists

#lists

The methods presented below can be used to sort items in lists. The items may be ordered or rearranged, but all items will remain part of the list. See the how-to Filter lists for methods to extract and filter items.

Sort items in a list (Sort List)

The component Sort Listwill sort a list according to the provided values (keys) at input K.

We can also add additional lists, besides input A, via ZUI. The attached lists will be sorted synchronously to the provided keys. We can, for example, retrieve the length of lines, add them to Sort Listas keys and also attach the lines itself at input A. Then, the component will sort our lengths and apply the same order to the list of lines.

Shuffle order (Jitter)

The component Jitteris pretty much the opposite of Sort List and will jumble our original list L up. We can influence the randomness by setting the Seed S. At input J, we can set the shuffling strength. The higher the value, the further might an item be shuffled away. Output I will give us the original indices.

Reverse order (Reverse List)

The component Reverse Listwill reverse the order of a list L.

We can also use a shortcut for this function: We can right-click an input or output grip of a component and then select Reverse to achieve the same. This will be indicated by the corresponding icon next to the grip.

Offset items in a list (Shift List)

The component Shift Listwill offset items in a list L by a given value S. The sequence is kept and if Wrap at input W is set to true, the values that are pushed off the original list will be added at the beginning. Otherwise, the list will be shortened and show items that remain after the shift.

This page is open source. Edit it on GitHub or see how you can contribute.

Up next