title: Unable to send data from node server to ajax
body: <p>In my server file I am trying to send over data from a txt file and receive it in ajax like so</p>
  
  <pre><code>app.get('/send', function(req, res) {
  showData = fs.readFile('file.txt', 'utf8', function(err, data) {
    res.send({data:data})
    })
  })
  </code></pre>
  
  <p>It reaches my ajax code and I want to append it to my html but I am unable to </p>
  
  <pre><code>console.log(response.data)
              response.data.forEach(function(val) {
                  console.log(val.id)
                  tbodyEl.append('\
                      &lt;tr&gt;\
                          &lt;th class="id"&gt;' + val.id + '&lt;/th&gt;\
                      &lt;/tr&gt;\
                      ')
              })
  </code></pre>
  
  <p>When I send through just a normal json variable from my server file it works but when I try use the text file it doesn't (saying TypeError: response.data.forEach is not a function )</p>