ho questa struttura:Linq GroupBy per passare dimensioni
var data1 = new Dictionary<int, List<string>>
{
{ 1, new List<string> { "A", "B", "C" } },
{ 2, new List<string> { "B", "C" } }
};
e ho bisogno di trasformarlo a questa struttura:
var data2 = new Dictionary<string, List<int>>
{
{ "A", new List<int> { 1 } },
{ "B", new List<int> { 1, 2 } },
{ "C", new List<int> { 1, 2 } }
};
Come posso usare LINQ per farlo? Uso GroupBy?
Grazie