List.Clean not working even with "preserveIndices" set to false

The node is working as intended. It is not supposed to clean empty strings ( "" ), which is the last input of your list.

Use this instead :

1 Like

So my issue was I was confusing “empty list” with “empty string”?

Or you can use List.Clean node in Orchid package.

1 Like

Yes. Empty lists appear in the preview of the nodes as… well "Empty List" (see Alban’s post). You can still use my method to filter the empty strings if you don’t want them (using OotB nodes), or use Alban’s method (Orchid package) :slight_smile:

1 Like

That’s great. Out of curiosity, does the clean use the order of the searchFor? As in, if you were to put the {} before the 1,2,3 in the searchFor input, would it return an empty list at index 1 after cleaning the 1…3 in the list input.