I have an array of objects called movies (const movies = movie[]
). A movie has the following properties:
movie: { name: string; description: string; date: Date; duration: number }
I want to use a RN SectionList
component, making sections from the movie.date
(Day):
**20 june 2020:**Movie name | description | durationMovie name | description | duration**18 april 2020:**Movie name | description | durationMovie name | description | duration...
How do I make the section and also how do I group my movies' array by date? I'm using lodash, but doing const groupedMovies = groupBy(movies, movie => movie.date);
returns a collection and not an array.