I have a JavaScript object like this
server1:[38,1,2,7]
server2:[6,2,1,4
server3:[160,30,21,20]
I want to insert the elements of this objects in an array like this
data1=[
[
{name:"Success", y:38},
{name:"Failure", y:1},
{name:"Aborted", y:2},
{name:"Unstable", y:7}
],
[
{name:"Success", y:6},
{name:"Failure", y:2},
{name:"Aborted", y:1},
{name:"Unstable", y:4}
],
[
{name:"Success", y:160},
{name:"Failure", y:30},
{name:"Aborted", y:21},
{name:"Unstable", y:20}
]
]
The first element of the key of JavaScript object is success, second element is failure, third element is unstable and fourth element is aborted.Is there any way I can do this? Any help will be appreciated