title: Convert string which is read from a file to json object in nodejs
body: <p>I am reading a string from a file and want to convert it into a <code>json</code> object
  File content: <code>{name:"sda"}</code></p>
  
  <p>Code:</p>
  
  <pre><code>var fs=require('fs');
  
  var dir='./folder/';
  fs.readdir(dir,function(err,files){
      if (err) throw err;
  
      files.forEach(function(file){
  
  
          fs.readFile(dir+file,'utf-8',function(err,jsonData){
              if (err) throw err;
              var content=jsonData;
              var data=JSON.stringify(content);
              console.log(data);
          });
  
      });
  </code></pre>
  
  <p>But I am getting this output: <code>{name:\"sda\"}</code></p>