I need help converting my JSON training data that includes classes and sentences into a different format.
[
{ class: 'Reservation', sentence: 'make reservation' },
{ class: 'Reservation', sentence: 'do reservation' },
{ class: 'Greetings', sentence: 'Hello' },
{ class: 'Greetings', sentence: 'Good Morning' }
]
How can I transform it into the following format?
[
{ class: 'Reservation', sentence: ['make reservation', 'do reservation'] },
{ class: 'Greetings', sentence: ['Hello', 'Good Morning'] }
]