Making dictionary

Hi all:
How to select a group of objects based on other objects, for example, in the script below, i’ve made a simple pattern of circles that vary in radius, then made a random selection of edges based on the same grid that i’ve generated the circles from.
The question is; how to re-select back the circles based on the same random points that form the centers of those circles.
I tried using nodes like sort by keys and making some dictionaries , but i failed cause the keys and the list are unmatched.
Sorry if i didn’t make my inquiry not clear enough, but here is a screen shot and the dynamo script as well.
dict.dyn (27.8 KB)

you can create a dictionary which has keys that are the center points, and the values are the circles. The keys will need to be the string representation of the point, this will work out better in most cases anyway because some rounding will be needed.

You should also be able to do this with nodes like groupByKey or groupByFunction.


Thank you Michael_Kirschner2:
I was missing the strings points, i did it and it worked.

Another interesting way to do this would be by writing the information into the point’s extensibe storage. It’s a little known feature that’s available to all geometric instances in Dynamo: