Convert Pass Fail to 0 and 1

I know how to do this, but its completely slipped my mind.

I need to convert values for a list I created that gives me a pass and fail and need to color range map those to red and green. (I’ve got the color part working but with different nodes).

How do I take this:

Fail
Fail
Pass
Pass
Pass
Pass
Fail

and convert it to

0
0
1
1
1
1
0

Hi, you can do something like this:

3 Likes

An alternative is the very useful Dictionary.ByKeysValues from SpringNodes:

2 Likes

Thanks guys, I definitely have SpringNodes, just never used that node before.

Both of these are great solutions!

1 Like