I have an array like below:
[
'author/2020/01/01/all_authors_000.csv',
'book/2020/01/01/all_books_000.csv',
'book/2020/01/01/all_books_001.csv',
'book/2020/01/01/all_books_002.csv',
'others/2020/01/01/other_stuff.csv',
]
As you can see there are three items that start with the word book
. I want to remove all but one, so I end up with something like:
[
'author/2020/01/01/all_authors_000.csv',
'book/2020/01/01/all_books_000.csv',
'others/2020/01/01/other_stuff.csv',
]
How can I achieve this?