How to find closest point on multiple points

I am trying to find the closest point on Point List B for each point on Point List A. Can anyone help me how to correctly do this in dynamo?

try to connect them maybe?

tried, it is not resulting to the closest point

Maybe a bit of a crazy work around:


how do i maintain the two list as separate?

Closest point.dyn (21.6 KB)

Hey, i think you are looking for this type of solution.
if in list A you have 10 point and list B you have 90points.
then you have to find the 10 point from list B which is closest to 10points of list A.