Lets say I have two data structures, an ordered List of Strings and a HashMap. The List looks like:
types = ["string", "integer", "boolean", "integer"];
And the HashMap, with an object key and a String value, that looks like:
map = {2=integer, true=boolean, 7=integer, "dog"=string};
Whats the easiest/most efficient way to reorganize the "order" of the Map so that the Map's values align with the ordering of the list, i.e., the Map would now look like this when printed:
map = {"dog"=string, 2=integer, true=boolean, 7=integer};