As we know normally we can pass array as following to Flot Aria Chart.
var data2 = [
[0, 1], [1, 0], [2, 2], [3, 0], [4, 1], [5, 3], [6, 1], [7, 5], [8, 2], [9, 3], [10, 2], [11, 1], [12, 0], [13, 2], [14, 8], [15, 0], [16, 0]
];
I'm getting an json output from a file and i need to convert that as json object like 'data2' in upper code. i'm running a loop like this.
var data1 = [];
var json = $.getJSON( "config/tsconfig.json", function () {
$.each( json.responseJSON, function( i, item ) {
});
});
And inside of that json file like this.
[[2,"2017-09-27",50,30,25],[2,"2017-09-28",70,50,49],[3,"2017-09-27",50,45,5],[3,"2017-09-28",100,95,90]]
How can i make a json object as in code one. any suggestions to put inside $.each loop?