I'm beginner to the JS development.what I want to do is write the data to a file in local storage.
In my application i read a raw data and save it in mongoDB as key value pairs.same time i want to write those data to a file in a local storage.
this code is used to read the read the file line by line.i get structured data in "event" .what i want to do is write those data to a file in local storage.
var lines = readDetails.split('\n');
for(var line = 0; line < lines.length-1; line++){
var FileContent = "";
var linesSpace = lines[line].split(' ');
for(var y=3;y <= linesSpace.length-1;y++){
FileContent +=linesSpace[y];
FileContent += " ";
}
var event = {
dat: linesSpace[0],
tim: linesSpace[1],
details: FileContent,
};
}
if this is not that much clear .please questioned me.
Thanks.