Nodejs fs module: How to readFile and create json object?
<p>I am reading below data from file now i want to create json object from it,how can i create that using nodejs fs module ?</p>

<p>app.js</p>

<pre><code>var path = "./ditLogs/" + file;
                fs.readFile(path, function(err, data) {
                   console.log('reading file data', data.toString());
                });
</code></pre>

<p>Here is data in file that i need to create json for </p>

<p>file.txt </p>

<pre><code>{"event":"test data"}
{"event":"test data"}
{"event":"test data"}
</code></pre>