Extract Single true values from sublists

hello, I’ve been trying to extract a single True Value from each Sublist in a list.
as you can see list unique items doesn’t do the job for its giving me the unique sublists

i tried something and it did the job but am sure there’s a way more efficient

Thanks

Sorry I’m quite new so forgive me if I’m wrong. Could you use a string.contains and filterbyboolmask node to achieve this? Or maybe the remove.ifnot node?

Hi @Mohammadz

Lacing to be longest for “List.AllIndicesOf” and “List.GetItemAtIndex”

5 Likes

yeah @Tom_James this is not my true concern, my goal was to get a SINGLE true value from each list without messing with the order, falses don’t matter that much for am using a list.map after that.

im quite new too! Thanks !

Hello @Kulkul

i tried this & it doesn’t really do the job, or maybe it does & my lists need more management.

am trying to match the mark of the furniture by the room number in a linked model. its all working smooth till i want to map the mark with the room number.

here im getting 13 values where actually i have only 9 & it’s all due to the double true values

then the question is why am getting double true values when mapping the point of a furniture with the room, i assume i should get only single TRUE in every sublist

thanks again!

Do you mean that you want to return a single true result per sublist IF any member in the sublist is true? If so then please articulate your question better!

If that is what you want then try this:

3 Likes

Thank you @Thomas_Mahon & sorry for misleading you.

yes this works but is seems that the issue is with my script itself. maybe i’ll start another thread. Thanks

Having a similar problem. I need it to grab Item 8 from list. Wants to grab Item 1. Tried adjusting levels but no luck. Thanks.