Hello
My question is, how can I invert the order of a dictionary in a list of dictionaries?
Example:
This is an example dictionary within a dictionary list.
Normal:
New List(Of Dictionary(Of String, List(Of Object)) From {
New Dictionary(Of String, List(Of Object)) From {
{“value1”, New List(Of Object) From {“a”, “b”, “c”},
{“value2”, New List(Of Object) From {“d”, “e”, “f”},
{“value3”, New List(Of Object) From {“g”, “h”, “i”},
}
}
Expected result:
New List(Of Dictionary(Of String, List(Of Object)) From {
New Dictionary(Of String, List(Of Object)) From {
{“value3”, New List(Of Object) From {“g”, “h”, “i”},
{“value2”, New List(Of Object) From {“d”, “e”, “f”},
{“value1”, New List(Of Object) From {“a”, “b”, “c”},
}
}
It should be said that the keys in the dictionary are dynamic, they can be few or many, as they are dynamically extracted from another data source.
The dictionaries within the list are accessed through the index.
I hope you can help me