I have .log file and I need to get this file in javascript and convert to JSON. I try this
var j= readTextFile("log991/sensorData.log");
console.log(j);
var jsonnn = JSON.stringify(j);
console.log(jsonnn);
But I only get path in console log. Is there any way to make this?
this is how .log file looks
2018-04-03 15:47:58,873 INFO log(17) batteryCurrent=-0.45, solarCurrent=3.27,
hybridCurrent=0, batteryVoltage=12.88, solarVoltage=13.09
2018-04-03 15:48:00,074 INFO log(17) batteryCurrent=-0.45, solarCurrent=3.27,
hybridCurrent=0, batteryVoltage=12.88, solarVoltage=13.09
2018-04-03 15:48:01,274 INFO log(17) batteryCurrent=-0.4, solarCurrent=3.28,
hybridCurrent=0, batteryVoltage=12.89, solarVoltage=13.1
thnx