Helper function to generate the data structure that SectionList (React Native) recieves as the `sections` prop, based on an array of plain objects and a key of the object.
Helper function to generate the data structure that SectionList (React Native) recieves as the `sections` prop, based on an array of plain objects and a key of the object.