I have a scenario while working for charts where i need to convert the below array of objects into other array of arrays.
Inputs
const country = [
{"country": "Germany","visits": "306"},
{"country": "USA","visits": "106"},
{"country": "UK","visits": "206"},
];
and the desired output should look like below::
[
["Country", "Visits"],
["Germany", 306],
["USA", 106],
["UK", 206]
]
I am unable to get this desired output.