JavaScript: How to group nested array
问题 I am trying to display data using SectionList in React Native. I have written the code below displaying what I am trying to accomplish. I want the data to first be grouped together by date , and inside of that date, I need them grouped by location. A regular JavaScript solution will work. It's important that it has a title and data key. My input data is in this format: [ { game_id: 1171, date: '2018-11-17', location: 'Plaza' }, { game_id: 1189, date: '2018-11-17', location: 'Field - Kickball'