I get my data from an API which looks like this:
desserts: [
{
name: ["Frozen Yohurt", "Ice cream Sandwich", "Egg"],
calories: [159, 237, 109]
},
My component (Vuetify Datatable) expects the data in a quite different form, like this:
desserts: [
{ name: "Frozen Yogurt", calories: 159},
{ name: "Ice cream sandwich", calories: 237 },
{name: "Egg", calories: 109 }
],
I was not able to solve it. This (Creating a JavaScript Object from two arrays) looks quite similar, but gives a different result. Can anyone help me?