Return only one member to the list

Hi forum! I have branches of lists with values, they may vary in length, for example
0,0,2,2,2,0; 0,2,0; 0,0;
and I want to maintain the tree structure, and make every list return only one “2” value.
0,0,2,0,0,0; 0,2,0; 0,0;
Any help appreciated!


forum question list members.gh (17.2 KB)

Something like this?


forum question list members_re.gh (16.4 KB)

1 Like

yep, great job!
ended up tweaking it a bit. Thank you very much!