Grasshopper selecting curve help!

Im trying to select curves based on their z values, but after sort is done, it doesn’t allow me to select curves on same z values. It is keep selecting one curve from each z value.
Please help me!

You can use this

Or this

Thank you for your help!
But unfortunately, the data tree is not working somehow, showing 0 selection for any tree branches.
Is there any other way that i can do or fix the problem?

NVM! Second one works! just some curves were having really odd z values like 0.0003 and that was the reason. Thank you so much!