I have the following data structure:
const data = {
school1:{location:'medway',score:6},
school2:{location:'milan',score:8},
school3:{location:'brooklyn',score:103,
}
How can I convert it to the following format in javascript:
const data = [
{name:'school1', location:'medway',score:6},
{name:'school2', location:'milan',score:8},
{name:'school3', location:'brooklyn',score:103}
]