On Tuesday, 24 December 2013 at 11:36:23 UTC, Dfr wrote:
Let's say i have array of kind:

auto a = [["1","0000FF"], ["2", "00FF00"], ...];

Is there simple way to turn it into associative array of kind:

string[string] b = ["1": "0000FF", "2": "00FF00", ...];

You can if the initial array was comprised of tuples instead of nested arrays.

http://dlang.org/phobos/std_array.html#.assocArray

Reply via email to