I’m working with this dataset:
set centerdata to {"CELTA Online Intensive 4-6 wks", "Mexico City, Mexico", "November 2 - December 11 2020", "December 21 2020 - January 29 2021", "$1250 USD", "CELTA Online Intensive 4-6 wks", "Buenos Aires, Argentina", "September 14 - October 16 2020", "$1470 USD", "CELTA Online Intensive 4-6 wks", "Austin, USA", "September 7 – October 2 2020", "October 26 - November 20 2020", "$1995 USD", "CELTA Online Intensive 4-6 wks", "Springfield, Missouri, USA", "September 14 - October 16 2020 ", "October 19 - November 20 2020 ", "$2200 USD*", "CELTA Online Intensive 4-6 wks", "Vancouver (West Pender Street) Canada", "September 14 - October 23 2020", "November 02 - December 11 2020", "$2495 CAD", "CELTA Online Intensive 4-6 wks", "Toronto (Jarvis Street), Canada", "August 24 - September 18 2020 ", "$2000 USD", "CELTA Online Intensive 4-6 wks", "Toronto (Eglinton Avenue), Canada", "September 14 – October 16 2020", "October 26 – November 27 2020", "$2695 CAD", "CELTA Online Intensive 4-6 wks", "Los Angeles, (Koreatown) California, USA", "August 24 - September 18 2020", "September 21 - October 16 2020", "$2595 USD", "CELTA Online Intensive 4-6 wks", "New York City (West 26th Street), USA", "August 24 - September 18 2020", "November 16 - December 11 2020", "November 16 - December 11 2020", "$2595 USD", "CELTA Online Intensive 4-6 wks", "Portland, Oregon, USA", "August 24 - September 18 2020", "September 21 - October 16 2020", "$2595 USD", "CELTA Online P/T 7+ wks", "Mexico City, Mexico", "August 24 - November 13 2020*", "September 7 - November 27 2020**", "September 21 - December 11 2020**", "October 5 - December 18 2020**", "October 19 - December 31 2020**", "November 9 2020 - February 5 2021**", "November 23 2020 - February 19 2021**", "December 7 2020 - March 5 2021**", "*$1250 USD / **$1400 USD ", "CELTA Online P/T 7+ wks", "Springfield, Missouri, USA", "September 21 - December 4 2020 ", "December 28 2020 - March 12 2021 ", "$2200 USD*", "CELTA Online P/T 7+ wks", "Montreal, Canada", "August 24 - November 13 2020", "October 5 - December 24 2020", "November 23 2020 - February 2 2021", "$2400 CAD", "CELTA Online P/T 7+ wks", "Toronto (Eglinton Avenue), Canada", "September 8 – November 28 2020", "$2695 CAD", "CELTA Online P/T 7+ wks", "Vancouver (West Pender Street) Canada", "September 8 - November 27 2020", "$2495 CAD"}
I’m trying to make a new list from this list or convert this list to a list of lists. Each list in the new list of lists should have the “CELTA Online” as the first item.
Or to put it another way, if I were to put this into a spreadsheet, each row should start with the item that contains “CELTA Online”, followed by the other items until the next ‘CELTA Online’ is encountered, in which case, it would go into the next row.
I’m trying to make it look like:
{
{“CELTA Online Intensive 4-6 wks”, “Mexico City, Mexico”, “November 2 - December 11 2020”, “December 21 2020 - January 29 2021”, “$1250 USD”},
{“CELTA Online Intensive 4-6 wks”, “Buenos Aires, Argentina”, “September 14 - October 16 2020”, “$1470 USD”}
}
Each row has a variable number of items, which has made this a bit difficult for me to figure out. Any ideas?