Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think they mean something that turns a list (array) of unique elements into a keyed collection (like a map or an object). So something like:

    [
      {id: 1, name: 'Jane'},
      {id: 2, name: 'John'}
    ]
becomes

    {
      1: {id: 1, name: 'Jane'},
      2: {id: 2, name: 'John'}
    }


This is driving me mad. This operation is called groupBy and it is a solved problem. How on earth is HN oblivious to such a fundamental operation?


Who’s HN here? What’s driving you mad? Not really clear what your point is.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: