D
arr.reduce((acc, { type, tagVal }) => {
const value = acc[type] ?? [];
return { ...acc, [type]: value.concat(tagVal) };
}, {});Size: a a a
D
arr.reduce((acc, { type, tagVal }) => {
const value = acc[type] ?? [];
return { ...acc, [type]: value.concat(tagVal) };
}, {});A
D
D
D
D
D
j
D
D
D
j
A
j
{rank:[], suit:[]} на {}j
j
D
D