title: Why am I not getting a JSON object in the response from my local node.js/express server?
body: <p>-- The background to situation --</p>
  
  <p>I'm making an e-form signup for a client of our business marketing strategy service blah blah blah...</p>
  
  <p>the form is done and looks great. now I need to hook it up to the existing API of the service our business uses to hold/sort/query/etc the submitted information.</p>
  
  <p>I'm a very junior developer and the API is very complex. I just want to make sure my ES6/javascript is in proper working order. The ajax calls are working, no bugs in my code etc. So it seemed the quickest easiest thing to do in order to test things was just make a simple local server so I can test my calls get everything working BEFORE I start going through tons of API documentation and getting it properly hooked up to our service. The first call seems to work fine. But I couldn't get my lil' baby server to "respond" properly with some static info to parse through. I'm primarily a front-end developer, but I'm obsessed with figuring this little server problem out at this point... So help would be VERY appreciated.</p>
  
  <p>-- the fetch request --</p>
  
  <pre><code>fetch('http://localhost:4000/send-zip')
              .then( 
                  (response) =&gt; {
                      response.json(),
                      console.log('begin fetch to local server'),
                      console.log(response),
                      populate_store_selector(response)
                  })
              .catch(
                  (error)=&gt; console.log('basic fetch request failed' + error)
              )
  </code></pre>
  
  <p>-- that other function in case people ask -- </p>
  
  <p>(it is simply meant to iterate through and populate an html
  input type="select" )</p>
  
  <pre><code>function populate_store_selector(arg) {
      for (i of arg) {
          let new_option = document.createElement('option')
          new_option.innerHTML = arg[i]
          select_shop.appendChild(new_option)
      }
  }
  </code></pre>
  
  <p>-- my little baby server -- </p>
  
  <pre><code>const express = require('express')
  const server = express()
  
  server.use(function (req, res, next) {
      res.header("Access-Control-Allow-Origin", "*");
      res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
      next();
  });
  
  server.get('/send-zip', function (req, res) {
      res.send({ "options": ['option1', 'option2', 'option3'] })
  })
  
  server.listen(4000, () =&gt; console.log('mock server listening on port 4000!'))
  </code></pre>
  
  <p>the server works just fine and does it's job OTHER than I'm never able to get it to send a JSON object back :(
  I've tried lots of things so far. Honestly it doesn't matter as my request on the front end works just fine but I'm too obsessed to let this go right now...</p>
  
  <p>-- what the console.log() shows in the browser -- </p>
  
  <pre><code>begin fetch to local server
  
  main.js:104 
  
  Response {type: "cors", url: "http://localhost:4000/send-zip", redirected: false, status: 200, ok: true, …}body: (...)bodyUsed: trueheaders: Headers {}ok: trueredirected: falsestatus: 200statusText: "OK"type: "cors"url: "http://localhost:4000/send-zip"__proto__: Response
  
  main.js:108 
  
  basic fetch request failedTypeError: arg is not iterable
  </code></pre>