How to get indexes by items content

Hello everyone
I need to get a list of indexes whish items content match with my input. For instance, if I have a list as it is shown on the figure below
Screenshot 2024-05-13 143810
I need to get all indexes which items contain “true”
In this case the indexes should be 1,4,6,7,8

Could you please help me with this issue?

1 Like

@avetik.kagramanian ,

you can use this node

or use python

# 🎯 get all IndicesOf
OUT = [i for i, x in enumerate(IN[0]) if x == True]

can`t find the node SP.NullAllIndicesOf

How to use the python script?
Screenshot 2024-05-13 150720

1 Like

@avetik.kagramanian ,

just use python instead of getting the package… ( i extracted the oneliner there :wink: )

does not work

@avetik.kagramanian ,

can you flatten the input… it is clean python, it should work

1 Like

Great, now it works
Thank you so much

I’d use that node.

4 Likes