unfortunately, not available in Node, so React won't transpile.Can't use in React.
Works in React web
Polyfill exists for React native, so might work in Node.js too.
con: no way to exclude stuff from being grouped. workaround: return null instead of a string to collect non-participants. The final object has a null key then
Object.groupBy
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/groupBy
unfortunately, not available in Node,
so React won't transpile.Can't use in React.Works in React web Polyfill exists for React native, so might work in Node.js too.
con: no way to exclude stuff from being grouped. workaround: return
null
instead of a string to collect non-participants. The final object has anull
key then