title: node.js nested http req object undefined - bodyParser.urlencoded({ extended: true } not working
body: <p>why is the nested object </p>
  
  <blockquote>
    <p>kategorien : [Object]</p>
  </blockquote>
  
  <p>undefined in my node.js app? </p>
  
  <p>Here is the console log from the console.log in the katalogCtrl:</p>
  
  <pre><code>     { _id: '591c08ccb673741787b123c2',
    bezeichnung: 'test',
    __v: 0,
    risiken: [ { bezeichnung: 'Naturgefahren', kategorien: [Object] } ] }
  </code></pre>
  
  <p>the server.js:</p>
  
  <pre><code>app.use(function (req, res, next) {
      res.setHeader('Access-Control-Allow-Origin', '*');
      res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
      res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With, application/json');
      res.setHeader('Access-Control-Allow-Credentials', true);
      res.setHeader("Content-Type", "application/json");
      next();
  });
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({ extended: true }));
  
  router.route('/katalog/update').post(
      authstrategies.authJWToken,
      authstrategies.check_if_is_admin,
      katalogCtrl.update_katalog);
  </code></pre>
  
  <p>the katalogCtrl:</p>
  
  <pre><code>exports.update_katalog = function (req, res) {
      console.log(req.body);
  }
  </code></pre>
  
  <p>and here the call from the client (angular 2):</p>
  
  <pre><code>    let headers = new Headers({ 'Content-Type': 'application/json' });
            headers.append('Authorization', localStorage.getItem('token'));
            let options = new RequestOptions({ headers: headers });
  
  let body = JSON.stringify(katalog);
              console.log(body);
              this.http
                  .post(this.CONSTANTS.APIURL+'/katalog/update', body, options)
                  .toPromise().
              then(value =&gt; {
                  console.log(value);
                  })
                  .catch();
  </code></pre>
  
  <p>the console.log from clients side:</p>
  
  <pre><code>    {
      "_id": "591c08ccb673741787b123c2",
      "bezeichnung": "test",
      "__v": 0,
      "risiken": [{
          "bezeichnung": "Naturgefahren",
          "kategorien": [{
              "_id": "5915ab9d19d0d027b870d259",
              "beschreibung": "-",
              "name": "Hochwasser"
          }, {
              "_id": "5915abd019d0d027b870d25a",
              "beschreibung": "-",
              "name": "Muren"
          }, {
              "_id": "5915abd719d0d027b870d25b",
              "beschreibung": "-",
              "name": "Oberflächenwasser"
          }]
      }]
  }
  </code></pre>