title: why does my JSON file contain [object Object]?
body: <p>I am using sqlite3 and nodeJS, and querying a database. I want to copy the queries into a json file. I run into problems with the json file having strings and objects. Why does my JSON file contain:</p>
  
  <p><code>[object Object]</code></p>
  
  <p>Here is my code:</p>
  
  <pre><code>db.all(sql, [], (err, rows) =&gt; {
  if(err) { 
    throw err; 
    }rows.forEach((row) =&gt; {
        arr_string = JSON.parse(JSON.stringify(row));
        fs.writeFile("tempo.json", arr_string, function(err){
      });
  
        console.log(arr_string);
    });
  });
  </code></pre>
  
  <p>I would like to eventually use ajax requests for these entries.</p>