I have two huge lists: list1 and list2.
I would like to keep elements of list1, only if their first key is part of list2.
Example:
list1 = {{aa, 2, 5}, {be, 1, 5}, {ce, 5, 2}, {de, 1, 20}, {ee, 5, 2}}
list2 = {aa, ce, de}
Expected resulted:
list1 = {{aa, 2, 5}, {ce, 5, 2}, {de, 1, 20}}
I tried Pick, but I couldn't find a way. I think I have to look for a pattern that says "Pick element only if element belongs to list2"? What could it be?
My lists are very large so I can't do it manually.