I have a list of maps something like this
iex(84)> a
[
%{a: 1, b: 2, c: [%{x: 1, y: 2}, %{x: 2, y: 3}]},
%{a: 3, b: 4, c: [%{x: 2, y: 3}, %{x: 2, y: 3}]},
%{a: 5, b: 6, c: [%{x: 3, y: 4}, %{x: 3, y: 4}]}
]
I'm trying to get a result like this
[
%{a: 1, b: 2, c: 8},
%{a: 3, b: 4, c: 10},
%{a: 5, b: 6, c: 14}
]
not able to map over the values of "c" and if I do I'm losing the initial map. What should I do?