title: cannot parse json req.body using node/express
body: <p>I'm new to node and express, and writing my first app. I have a json parsing issue that I've been struggling with for hours:</p>
  
  <p>my code looks something like this:</p>
  
  <pre><code>...
  var app = express()
  app.use( bodyParser.json() );       
  app.use( bodyParser.urlencoded() ); 
  ....
  
  app.post('/callback', function(req, res, next) {
           var body = req.body
           var subscriptionId = body['subscriptionId']
  
           res.send() // 204
           console.dir(body);
           console.log(subscriptionId);
  ...
           })
  </code></pre>
  
  <p>All my efforts to parse the subscriptionID out of the JSON request is unsuccessful. FYI, below is the console dump from the request. The subscriptionID comes as undefined.</p>
  
  <p>[ { collectionType: 'activities',
      date: '2014-07-05',
      ownerId: '296XYK',
      ownerType: 'user',
      subscriptionId: 'E3636aaa4-8482-40B7-9533-B805F002416A' } ]
  undefined</p>
  
  <p>What am I doing wrong? Your help is greatly appreciated!!</p>