What is the Best way to convert,
{
"columns":[
"name",
"color"
],
"values":[
[
"lion",
"yellow"
],
[
"crow",
"black"
]
]
}
into
{
"data":[
{
"name":"lion",
"color":"yellow"
},
{
"name":"crow",
"color":"black"
}
]
}
Rather than loop, Is there any function available ? Can I achieved it through something like extend() ?