Compare a List value to a list of values

Hello Everyone,

I am very new to Dynamo. I learned about the program less then a week ago and is very intrigued, therefore I started to absorb as much as a can to learn the program. I started creating my own script and I cant figure out how to compare a value in a list with a list of values. please check my image:

I want to compare the top list value [0] to the entire list at the bottom, then the value [1] to the entire bottom list, etc . The best I can explain it is with this formula: if (a==0.25, true, if (a==0.5,true, if (a==0.75, true, if(a==0,true,false)))). The return would be a list true or false that can be placed in a Boolean filter.

I Tried
-Cross Lace - but I am having trouble returning the nested list to a single list of just true and false.
-I also tried variations of List.Create, IndexOf, BoolFilter, List.Map combinations using the single list and nest list with no results.

Thank you very much for reading. Any hints or direction would be wonderful. Thanks

I forgot to included the code block I tried.

Thanks again for your help.

Here are some other possible ways.

Vikram

Thank you very much! I tried that tool but it seams I had the inputs backwards which gave me an incorrect result. Thanks again!

1 Like

Kulkul,

Thanks for your solutions as well. You code accomplishes the goal in more steps but I can learn more from it. I will be playing with these options as well. Thank you very much for your help.

The List.Map is a confusing node for me. Each time I think I understand it. I create a script to test my theory and the outcome is different.

This may be an error, but I am unsure how I am getting those decimal places:

As you can see at the top. I should have a whole number (I check with a calculator) on item [3]. Either way I used your approach to remove the decimal places.