I'll take inspiration from this previous question. I have a dictionary with lists inside, and I want to get the key by a value inside one of those.
Dictionary<string, List<string>> myDict = new Dictionary<string, List<string>>
{
{"1", new List<string>{"1a", "1b"} },
{"2", new List<string>{"2a", "2b"} },
{"3", new List<string>{"3a", "3b"} },
};
I'm confident that all values inside are unique.
I want something like this:
getByValueKey(string value);
getByValueKey("2a") must be return "2".