I currently have data returning in the format from the backend of an application done in PHP (Laravel):
data [
{
"Jan": 120,
"Feb": 283.5,
"Mar": 10,
"Apr": 233.92,
"May": 327.78,
"Jun": 190.74,
"Jul": 10,
"Aug": 10,
"Sep": 10,
"Oct": 10,
"Nov": 10,
"Dec": 10
}
]
I want to then graph this data, which is the average order values of a specific company by month, in the front-end using JavaScript (Vue). Though for it to work it needs to be in the format:
new_data [
["Jan", 120],
["Feb", 283.5],
["Mar", 10],
["Apr", 233.92],
["May", 327.78],
["Jun", 190.74],
["Jul", 10],
["Aug", 10],
["Sep", 10],
["Oct", 10],
["Nov", 10],
["Dec", 10]
]
I have seen how to do this for similar things on Stack Overflow (i.e. Object to Array (an array of arrays)) but none fit this exact example.