I have an array of object data like the following structure:
var mydata=[
{"category" :"phone","name":"Apple","model":"5s"},
{"category" :"phone","name":"Moto","model":"g4"}
]
I want to convert this into an array of arrays like this structure:
var expextedData=[
["category","name","model"],
["phone","Apple","5s"],
["phone","Moto","g4"]
]