JSFiddle - React, Tailwind, and code Playground
by Rahul Desai
JavaScript
var data =[["2012-12-31",300],["2013-01-07",300],["2013-01-14",300],["2013-01-21",300],["2013-01-28",300],["2013-02-04",300],["2013-02-11",300],["2013-02-18",300],["2013-02-25",10300],["2013-03-04",300],["2013-03-11",300],["2013-03-18",300],["2013-03-25",300],["2013-04-01",300],["2013-04-08",300],["2013-04-15",300],["2013-04-22",300],["2013-04-29",300],["2013-05-06",300],["2013-05-13",300],["2013-05-20",300],["2013-05-27",300],["2013-06-03",300],["2013-06-10",300],["2013-06-17",300],["2013-06-24",300],["2013-07-01",300],["2013-07-08",300],["2013-07-15",300],["2013-07-22",300],["2013-07-29",300],["2013-08-05",300],["2013-08-12",300],["2013-08-19",275,279,300,300],["2013-08-26",300],["2013-09-02",300],["2013-09-09",300],["2013-09-16",300],["2013-09-23",300],["2013-09-30",300],["2013-10-07",300],["2013-10-14",300],["2013-10-21",300],["2013-10-28",300],["2013-11-04",300],["2013-11-11",300],["2013-11-18",300],["2013-11-25",300],["2013-12-02",300],["2013-12-09",300],["2013-12-16",300],["2013-12-23",300],["2013-12-30",300]];
data.forEach(function(element){
var myDate = new Date(element[0]);
var epochDate = myDate.getTime();
//console.log(epochDate);
element[0] = epochDate;
});
console.log(JSON.stringify(data));