Okay this is late on a Friday and this is something I should probably already know, but I am not sure of the best approach. If I have a dictionary of values like this Zero, A One, B and I have a list, Zero, Zero, One, Zero, One. How could I produce a list that matches using the second values A,A,B,A,B. The solution I am looking for would be variable and have no hardcoded aspects, meaning you could add n amount of different values to the list (Two, Three,ect). I believe there is some recursion and logic, some list.map. Also maybe a list.combine. Trying to do this all OOTB. Jamie

# LOGIC If value matches a value in a dictionary , append associated value

The Dictionary nodes are not OOTB, they are from Lunchbox. However, the functions appear to work in code blocks too. I do not know if it is because I have downloaded the lunchbox package.

Wait, so that wasnâ€™t terribly robust. If there were a problem, you would get the first value in the dictionary. Hereâ€™s a more robust solution, where an incorrect value yields a null value at the end.

CM - I think this will work trying on a larger example now. Thanks!

Â

Tim that dict ds function is interesting, i have to try that out also.

**Kyle_Martin**#6

I was able to produce the same results with a slightly different approach. It would be much easier if you could use the NullAllIndecesOf node from the SpringNodes package [image 1], however I replaced this functionality with default nodes to keep everything OOTB [image 2]â€¦

Â

Â

The â€śDictionary.ByKeysValuesâ€ť node from spring nodes makes an actual dictionary and should perform much faster for large data sets. (because evaluations are not free)

Pairing Data according to criteria - Dictionary

Parameter fron Excel to Revit with vlookup formula