How do i smartly join a List of Associations (eg. returned by ParallelTable) such that i get a single Association?
list = {<|"a" -> aValue|>, <|"b" -> bValue|>}
association = <|"a" -> aValue,"b" -> bValue|>
what line of code returns association created from list?
I tried various stock functions, but failed to find a fitting one.
It could work by calling Join[(*elements of list seperated by comma*)]
but i do not know how to write such call.
My current workaround is:
assoc = <||>
Do[AppendTo[assoc, elem], {elem, list}]
Join@@{<|"a" -> aValue|>, <|"b" -> bValue|>}
$\endgroup$ – Kirill Belov Oct 2 '18 at 14:36Merge[{<|"a" -> 1|>, <|"b" -> 3|>}, Identity]
? $\endgroup$ – J. M.'s ennui♦ Oct 2 '18 at 14:46<|list|>
;P $\endgroup$ – Kuba♦ Oct 2 '18 at 15:53Merge[{<|"a" -> 1|>, <|"b" -> 3|>}, First]
, if you don't want lists in your result. $\endgroup$ – Sjoerd Smit Oct 2 '18 at 15:58