I'm doing doing "map" over a collection and getting back a list of maps:
res1 = Enum.map(my_collection, fn a -> %{a.id => get_some_data(a)} end) # => [%{1 => 123}, %{2 => 456}] How can I flatten the list of maps - res1 - so that I have this:
%{1 => 123, 2 => 456}