Is there a way of changing my array of objects into a few seperate arrays for each property of my objects?
For example, I have this:
[
{
date: Mon Aug 08 2016 16:59:16 GMT+0200 (CEST),
visits: 0,
hits: 578,
views: 5131
},
{
date: Tue Aug 09 2016 16:59:16 GMT+0200 (CEST),
visits: -1,
hits: 548,
views: 722
},
{
date: Wed Aug 10 2016 16:59:16 GMT+0200 (CEST),
visits: -1,
hits: 571,
views: 4772
}
]
And I want it to look like this:
var dates = ["date1", "date2", ...],
visits = ["visit1", "visit2", ...],
hits = ["hits1", "hits2", ...],
views = ["view1", "view2", ...];
So that I can use it with plot.ly.