Cull items from the list with boolean value leaving empty lists

Hi All,

How would one cull a list of values with true false statement leaving empty lists where conditions are not met?

image

list.clean ??

Thank you the component functionality seems what I am looking for but I can’t seem to deal with list management properly. Any idea what I am doing wrong?

Got it to be in the same list structure, but it did not remove the false values.
image

Had to use filter by bool mask instead.

The preserveIndices input is a boolean. Also, you wouldn’t use x==0 as that still leaves you with empty lists.

1 Like

I was after bool mask instead tho, I might not explained it well enough across there. Thank you for your help!

I understand what you’re trying to do now. There’s a clockwork node to replace empty lists. You would use this to replace the empty lists with a true or false (depending on the condition) before filtering your list.

The problem I think you’re running into is that the values you’re filtering and the empty list are not at the same levels. So it may take a less straight forward solution.

I want to keep those empty lists to keep the specific list structure, this is all part of a much bigger graph. The solution on post 5 is exactly what I had in mind.

Please mark it as the solution then.

Apologies just did.