How to iterate Dicitonary and get concrete Key by Value

I have a Dictionary(String, String)- “dict” {1,A; 2,B; 3,C…}.
I am trying to get keys by values for further usage by doing: for each item in dict.values - messageBox(item.keys)
But it doesnt work…
Has anyone faced thies problem?

1 Like

Thank you for video, I have watched it. But still don’t know the solution.
I just need
-for each value in dict
-if value = “abc”
–get key that belong to this value…

Don’t know how to arrange it

Hi @Slavich,

Refer this post
How to access Key & Values individually and not in for loop from dictionary



Great! It works.
The problem was in typeArgument in for-each. I had there IDictionary, and in fact there should have been KeyValuePair.
Thanks a lot!

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