Level 53
@hourlee Try something like this:
const obj = { "1":5,"2":7,"3":0,"4":0,"5":0 };
const resultArray = Object.keys(obj).map(function(key) {
return [Number(key), obj[key]];
});
console.log(resultArray);
1 like
Summer Sale! All accounts are 50% off this week.
i am using vue paginator and vue-json-to-excel. Vue paginator needs data in object while vue-json-to-excel needs data in array. How can I make this work? Thanks
Please or to participate in this conversation.