Create a dictionary where the key is associated to multiple values of different types

I want to create a dictionary where the key is associated to multiple values of different types. For instance, I want “option A” to be associated with the polycurve and the point shown in the graph below. Thanks in advance!

I think you need to group your keys and values like this:


Does that help?

4 Likes

It worked, but I was hoping to find a quicker way. Thanks though!

When I call values, I get an error saying that “converting arrays would cause array rank reduction”. I wish someone thinks of a different solution!

Can you post an image of the result? I need to see how your list is structured in order to suggest a solution.

1 Like

Before the dictionary
Convert all your values to a string
Concat all values with a special character in between
Store this concated string in the dictionary

After the dictionary is created
Extract the values (the concated string)
Use String.Split to get all the separated values back to what they were, leaving out the “special character”

1 Like

Thank you Frank and Marcel for your help!

1 Like