Nested Dictionaries - UIPath Data Manipulation Practice -RPA Developer Certification

The below nested dictionary practice is found in the in UIpath Academy Data Manipualtion practices.

Name_CityWeight_Dict =New Dictionary(Of String, Dictionary(Of String, Double)) From {
{“John C”, New Dictionary( Of String, Double) From {{“Madrid”,2.1},{“Paris”,1.1}} },
{“Sarah C”, New Dictionary( Of String, Double) From {{“New York”,2.1},{“Paris”,3.3},{“Berlin”, 0.8}} },
{“Kyle R”, New Dictionary( Of String, Double) From {{“San Francisco”,2.8},{“New York”,1.1}} },
{“Johnny B”, New Dictionary( Of String, Double) From {{“New York”,2.1},{“Paris”,3.3}, {“Cairo”,1.3}, {“Chicago”,1.9}} }
}

Now, to dispaly the dictionary as such,

For each PersonName in Name_CityWeight_Dict

      WriteLine (PersonName.key) //gives the names as John C,Sarah C

     For each city in PersonName.Value

            WriteLine (" DICTIONARY ( "  + PersonName.Key + "): is " +  " (CITY NAME : " +                                           City.Key.ToString + " ,  WEIGHT:  " + City.Value.ToString + "  )"

OUTPUT:

PERSON NAME : John C

DICTIONARY ( John C): is (CITY NAME : Madrid , WEIGHT: 2.1 )

DICTIONARY ( John C): is (CITY NAME : Paris , WEIGHT: 1.1 )

PERSON NAME : Sarah C

DICTIONARY ( Sarah C): is (CITY NAME : New York , WEIGHT: 2.1 )

DICTIONARY ( Sarah C): is (CITY NAME : Paris , WEIGHT: 3.3 )

DICTIONARY ( Sarah C): is (CITY NAME : Berlin , WEIGHT: 0.8 )

and it goes on .

My question here is ;

How to get the (Cityname,weight) ie.“Madrid”,2.1, “Paris”,1.1 without using iteration of another for each?

is there something like , WriteLine (PersonName.Value.Tokeyvaue()) ??what is the use of Tokeyvaue()?

Hello @sri24!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff