Trying to convert below template
[
%{ids: ["A123"], name: "Red"},
%{ids: ["A123"], name: "Blue"},
%{ids: ["B123"], name: "Blue"}
]
to
[
%{ids: ["A123"], name: "Red"},
%{ids: ["A123", "B123"], name: "Blue"},
]
If the key name is same combine id in one list. For Eg: the name blue has two ids and merged t0 one list. Can anyone help me to achieve this using Enum.reduce