JSFiddle - React, Tailwind, and code Playground

JavaScript

myArray = [
  {group: "one", color: "red"},
  {group: "two", color: "blue"},
  {group: "one", color: "green"},
  {group: "one", color: "black"}
]

var res = myArray.reduce(function(res, currentValue) {
    if ( res.indexOf(currentValue.group) === -1 ) {
      res.push(currentValue.group);
    }
    return res;
}, []).map(function(group) {
    return {
        group: group,
        color: myArray.filter(function(_el) {
          return _el.group === group;
       }).map(function(_el) { return _el.color; })
    }
});

console.log(res);