Get all elements by parameter values

I found this thread when Googling how to select elements using a list of parameter values. This thread helped me, though it still wasn’t 100% clear how to get it working. I figured out a method and am showing it here.