Dictionary in a dictionary

I have a Dictionary in a Dictionary like so ‘new Dictionary (Of string, Dictionary (Of string, string))’. I’m reading a table from an Excel sheet into a Data Table and i’m iterating through it. I want to add the data to the Dictionary. So my plan is to save the name of the table row in the first key(string) so i know what the data relates to and then I want to add the rest of the data in the second dictionary like status, description, email etc. and have the first string in the second dictionary the column name and then the value from the data table. I can’t seem to figure out how to save the data though. I’ve read a few posts but I have had no luck in finding a solution.

1 Like

Basicly my question is how do I assign a dictionary key and then get the data I need from my data table and assign the dictionary inside? so let’s say I have…

variables:
Name(string) = “John’s Company”
description(string) = “Cheap laptop repairs.”
email(string) = “johnco@gmail.com

so with the data type - Dictionary (Of string, Dictionary (Of string, string))
I want to assign the name(John’s Company) as the key and the value of the dictionary will be a dictionary entry with the key “Description” and the value will be the variable Description and the same for email key will be “Email” and the value will be the variable email.

@James.D Can you Check this workflow , It is just for understanding purpose, How actually to Implement the Procedure you needed :
Main.xaml (5.0 KB)

3 Likes

@supermanPunch Thank you so much! This is perfect.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.